<commit_before>var axios = require("axios");

function HTTPBinary(configuration){
  this.config = configuration;

  this.config["headers"] = {
    "Content-Type":"application/cloudevents+json; charset=utf-8"
  };
}

HTTPBinary.prototype.emit = function(cloudevent){

  // Create new request object
  var _config = JSON.parse(JSON.stringify(this.config));

  // Always set stuff in _config
  var _headers = _config["headers"];
  _headers["Content-Type"] = cloudevent.getContenttype();

  _headers["CE-EventType"] = cloudevent.getType();
  _headers["CE-EventTypeVersion"] = cloudevent.getEventTypeVersion();
  _headers["CE-CloudEventsVersion"] = cloudevent.getSpecversion();

  _headers["CE-Source"] = cloudevent.getSource();
  _headers["CE-EventID"] = cloudevent.getId();
  _headers["CE-EventTime"] = cloudevent.getTime();
  _headers["CE-SchemaURL"] = cloudevent.getSchemaurl();

  // Set the cloudevent payload
  _config["data"] = cloudevent.format();

  // Return the Promise
  return axios.request(_config);
};
<commit_msg>HTTP Binary<commit_after>var axios = require("axios");

function HTTPBinary(configuration){
  this.config = configuration;

  this.config["headers"] = {
    "Content-Type":"application/cloudevents+json; charset=utf-8"
  };
}

HTTPBinary.prototype.emit = function(cloudevent){

  // Create new request object
  var _config = JSON.parse(JSON.stringify(this.config));

  // Always set stuff in _config
  var _headers = _config["headers"];
  _headers["Content-Type"] = cloudevent.getContenttype();

  _headers["CE-EventType"] = cloudevent.getType();
  _headers["CE-EventTypeVersion"] = cloudevent.getEventTypeVersion();
  _headers["CE-CloudEventsVersion"] = cloudevent.getSpecversion();

  _headers["CE-Source"] = cloudevent.getSource();
  _headers["CE-EventID"] = cloudevent.getId();
  _headers["CE-EventTime"] = cloudevent.getTime();
  _headers["CE-SchemaURL"] = cloudevent.getSchemaurl();

  // Set the cloudevent payload
  _config["data"] = cloudevent.format().data;

  // Return the Promise
  return axios.request(_config);
};

{'fraction_non_alphanumeric': 0.15635655138821236, 'fraction_numerical': 0.000974184120798831, 'mean_word_length': 5.205438066465256, 'pattern_counts': {'":': 2, '<': 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': '4416930', 'n_tokens_mistral': 681, 'n_tokens_neox': 667, 'n_words': 109}