<commit_before>// sudo npm install request

var request = require('request');

request({
  //this disables the ssl security (would accept a fake certificate). see:
  //http://stackoverflow.com/questions/20082893/unable-to-verify-leaf-signature
  "rejectUnauthorized": false,
  'url': 'https://api.tnyu.org/v2/events',
  timeout: 100000
}, function(err, response, body){
	var apiJson = JSON.parse(body),
		events = apiJson["data"];
	console.log(events[0]); // print out the first events
});<commit_msg>Add headers<commit_after>// sudo npm install request

var request = require('request');

request({
  //this disables the ssl security (would accept a fake certificate). see:
  //http://stackoverflow.com/questions/20082893/unable-to-verify-leaf-signature
  "rejectUnauthorized": false,
  "url": 'https://api.tnyu.org/v2/events',
  "headers": {
  	"content-type": "application/vnd.api+json",
  	"accepts": "application/*, text/html, */*"
  }
  timeout: 100000
}, function(err, response, body){
	var apiJson = JSON.parse(body),
		events = apiJson["data"];
	console.log(events[0]); // print out the first events
});
{'fraction_non_alphanumeric': 0.1672661870503597, 'fraction_numerical': 0.02877697841726619, 'mean_word_length': 4.429268292682927, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3462610', 'n_tokens_mistral': 388, 'n_tokens_neox': 354, 'n_words': 89}