<commit_before>import * as _ from 'lodash';
declare var fetch: any;
declare var Request: any;
declare var Headers: any;
let defaultHeaders = {
    'Content-Type': 'application/json;charset=utf-8',
    'Cache-Control': 'no-cache'
};
// use fetch for all API calls
const doFetch = (url: string, headers: any = {}): Promise<any> => {
    const allHeaders = _.assign(defaultHeaders, headers);
    return fetch(url, {
            method: 'GET',
            headers: allHeaders
        })
        .then(response => {
            return response.json();
        });
};

const doPost = function <T>(url: string, data: T, headers: any = {}): Promise<any> {
    const allHeaders = _.assign(defaultHeaders, headers);
    const request = {
        method: 'POST',
        mode: 'cors',<commit_msg>added CORS mode to GET call<commit_after>import * as _ from 'lodash';
declare var fetch: any;
declare var Request: any;
declare var Headers: any;
let defaultHeaders = {
    'Content-Type': 'application/json;charset=utf-8',
    'Cache-Control': 'no-cache'
};
// use fetch for all API calls
const doFetch = (url: string, headers: any = {}): Promise<any> => {
    const allHeaders = _.assign(defaultHeaders, headers);
    return fetch(url, {
            method: 'GET',
            mode: 'cors',
            headers: allHeaders
        })
        .then(response => {
            return response.json();
        });
};

const doPost = function <T>(url: string, data: T, headers: any = {}): Promise<any> {
    const allHeaders = _.assign(defaultHeaders, headers);
    const request = {
        method: 'POST',
        mode: 'cors',
{'fraction_non_alphanumeric': 0.1453416149068323, 'fraction_numerical': 0.0012422360248447205, 'mean_word_length': 2.764018691588785, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '5913255', 'n_tokens_mistral': 483, 'n_tokens_neox': 472, 'n_words': 142}