<commit_before>'use strict';

var Debug = require('Debug'),
    request = require('request'),

    debug = new Debug('zipper');

module.exports = function httpNotification(options, callback) {
    var notification = options.notification,
        results = options.results,
        job = options.job;

    debug('Sending HTTP notification to "%s %s"', notification.method, notification.url);

    request({
        method: notification.method,
        url: notification.url.replace(/{:id}/g, job.id),
        json: {
            id: job.id,
            status: results.status,
            location: results.location,
            size: results.size
        }
    }, function(err, res, body) {
        if(err) {
            debug('Error sending HTTP notification');
            return callback(err);
        }

        debug('Notification sent, status code: %s', res.statusCode);
        if(res.statusCode === 200) {
            debug('Response was successful, response body:');
            debug(body);
        }

        callback(null, res.statusCode);
    });
};<commit_msg>Minor fix<commit_after>'use strict';

var Debug = require('debug'),
    request = require('request'),

    debug = new Debug('zipper');

module.exports = function httpNotification(options, callback) {
    var notification = options.notification,
        results = options.results,
        job = options.job;

    debug('Sending HTTP notification to "%s %s"', notification.method, notification.url);

    request({
        method: notification.method,
        url: notification.url.replace(/{:id}/g, job.id),
        json: {
            id: job.id,
            status: results.status,
            location: results.location,
            size: results.size
        }
    }, function(err, res, body) {
        if(err) {
            debug('Error sending HTTP notification');
            return callback(err);
        }

        debug('Notification sent, status code: %s', res.statusCode);
        if(res.statusCode === 200) {
            debug('Response was successful, response body:');
            debug(body);
        }

        callback(null, res.statusCode);
    });
};
{'fraction_non_alphanumeric': 0.13152985074626866, 'fraction_numerical': 0.002798507462686567, 'mean_word_length': 2.201492537313433, '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': '3586167', 'n_tokens_mistral': 573, 'n_tokens_neox': 556, 'n_words': 141}