<commit_before>/**
 *
 * @param options.url
 * @param options.secret
 */
module.exports = function(options, http) {
    return {

        /**
         * Schedule a job
         *
         * @param  {Object}     requestBody     The job definition
         */
        scheduleJob: function(ruuid, requestBody) {
            return http.post(ruuid, options.url + "/sched/api/job-def", requestBody, null, null, null, {
                headers: {
                    "X-Sched-secret": options.secret
                }
            });
        },

        /**
         * Acknowledge a job
         *
         * @param  {int}     jobId      The uid of the job to acknowledge
         */
        ackJob: function(ruuid, jobId) {
            return http.post(ruuid, options.url + "/sched/api/job-action/ack", {
                id: jobId
            }, null, null, null, {
                headers: {
                    "X-Sched-secret": options.secret
                }
            });
        },

        /**
         * Delete a job
         *
         * @param  {int}     jobId      The uid of the job to acknowledge
         */
        deleteJob: function(ruuid, jobId) {
            return http.delete(ruuid, options.url + "/sched/api/job-def", {
                id: jobId
            }, null, null, null, {
                headers: {
                    "X-Sched-secret": options.secret
                }
            });
        }
    };
};<commit_msg>Refactor node-tech-http methods<commit_after>/**
 *
 * @param options.url
 * @param options.secret
 */
module.exports = function(options, http) {
    return {

        /**
         * Schedule a job
         *
         * @param  {Object}     requestBody     The job definition
         */
        scheduleJob: function(ruuid, requestBody) {
            return http.post(ruuid, {
                url: options.url + "/sched/api/job-def",
                body: requestBody,
                headers: {
                    "X-Sched-secret": options.secret
                }
            });
        },

        /**
         * Acknowledge a job
         *
         * @param  {int}     jobId      The uid of the job to acknowledge
         */
        ackJob: function(ruuid, jobId) {
            return http.post(ruuid, {
                url: options.url + "/sched/api/job-action/ack",
                body: {
                    id: jobId
                },
                headers: {
                    "X-Sched-secret": options.secret
                }
            });
        },

        /**
         * Delete a job
         *
         * @param  {int}     jobId      The uid of the job to acknowledge
         */
        deleteJob: function(ruuid, jobId) {
            return http.delete(ruuid, {
                url: options.url + "/sched/api/job-def",
                body: {
                    id: jobId
                },
                headers: {
                    "X-Sched-secret": options.secret
                }
            });
        }
    };
};
{'fraction_non_alphanumeric': 0.11488511488511488, 'fraction_numerical': 0.0, 'mean_word_length': 1.0297297297297296, 'pattern_counts': {'":': 6, '<': 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': '7099430', 'n_tokens_mistral': 830, 'n_tokens_neox': 785, 'n_words': 175}