<commit_before>export default (url, callback)=> {
  var httpRequest = new XMLHttpRequest()
    httpRequest.onreadystatechange = function() {
        if (httpRequest.readyState === 4) {
            if (httpRequest.status === 200) {
                var data = JSON.parse(httpRequest.responseText)
                if (callback) callback(data)
            }
        }
    }
    httpRequest.open('GET', url)
    httpRequest.send()
}<commit_msg>explicitly accept json in ajax requests<commit_after>export default (url, callback)=> {
  var httpRequest = new XMLHttpRequest()
    httpRequest.onreadystatechange = function() {
        if (httpRequest.readyState === 4) {
            if (httpRequest.status === 200) {
                var data = JSON.parse(httpRequest.responseText)
                if (callback) callback(data)
            }
        }
    }
    httpRequest.setRequestHeader("Accept", "application/json")
    httpRequest.open('GET', url)
    httpRequest.send()
}
{'fraction_non_alphanumeric': 0.1189245087900724, 'fraction_numerical': 0.008273009307135471, 'mean_word_length': 2.4326241134751774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5357339', 'n_tokens_mistral': 279, 'n_tokens_neox': 262, 'n_words': 57}