<commit_before>'use strict';

var _ = require('../tools/tools');

_.onMessage('http', function (e, message) {

  _.http( message.url, {
    method: message.method,
    contentType: message.contentType,
    data: message.data,
    params: message.params
  } ).then(function (response) {
    e.source.postMessage({
      aplazame: 'http',
      event: 'response',
      result: 'success',
      response: _.http.plainResponse(response)
    }, '*');
  }, function (response) {
    e.source.postMessage({
      aplazame: 'http',
      event: 'response',
      result: 'error',
      response: _.http.plainResponse(response)
    }, '*');
  });

});

module.exports = { ready: true };<commit_msg>http service returns source message<commit_after>'use strict';

var _ = require('../tools/tools');

_.onMessage('http', function (e, message) {

  _.http( message.url, {
    method: message.method,
    contentType: message.contentType,
    data: message.data,
    params: message.params
  } ).then(function (response) {
    e.source.postMessage({
      aplazame: 'http',
      event: 'response',
      result: 'success',
      response: _.http.plainResponse(response),
      srcMessage: message
    }, '*');
  }, function (response) {
    e.source.postMessage({
      aplazame: 'http',
      event: 'response',
      result: 'error',
      response: _.http.plainResponse(response),
      srcMessage: message
    }, '*');
  });

});

module.exports = { ready: true };
{'fraction_non_alphanumeric': 0.16895604395604397, 'fraction_numerical': 0.0, 'mean_word_length': 2.9700272479564034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1172342', 'n_tokens_mistral': 457, 'n_tokens_neox': 450, 'n_words': 94}