<commit_before>'use strict';

var Promise = require('native-or-bluebird');
var got = require('got');

var promise = function (url, opts, cb) {
	return new Promise(function (resolve, reject) {
		got(url, opts, function (err, body, res) {
			if (err) {
				err.response = res;
				return reject(err);
			}

			res.body = body;
			resolve(res);
		});
	});
};

[
	'get',
	'post',
	'put',
	'patch',
	'head',
	'delete'
].forEach(function (el) {
	got[el].promise = function (url, opts, cb) {
		opts = opts || {};
		opts.method = el.toUpperCase();
		return promise(url, opts, cb);
	};
});

got.promise = promise;

module.exports = got;<commit_msg>do not change user opts<commit_after>'use strict';

var Promise = require('native-or-bluebird');
var got = require('got');

var promise = function (url, opts, cb) {
	return new Promise(function (resolve, reject) {
		got(url, opts, function (err, body, res) {
			if (err) {
				err.response = res;
				return reject(err);
			}

			res.body = body;
			resolve(res);
		});
	});
};

[
	'get',
	'post',
	'put',
	'patch',
	'head',
	'delete'
].forEach(function (el) {
	got[el].promise = function (url, opts, cb) {
		return promise(url, objectAssign({}, opts, {method: el.toUpperCase()}), cb);
	};
});

got.promise = promise;

module.exports = got;
{'fraction_non_alphanumeric': 0.19390148553557468, 'fraction_numerical': 0.0, 'mean_word_length': 3.688644688644689, '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': '1604381', 'n_tokens_mistral': 510, 'n_tokens_neox': 472, 'n_words': 120}