<commit_before>const request = require('request-promise-native')

const parseRequestSettings = (url, token) => {
    let settings = { 
        url: url, 
        headers: {
            'User-Agent': 'request',
            Accept: 'application/octet-stream'
        }
    }
    if(token)
        settings.auth = {
            bearer: token,
            sendImmediately: true
        }
    return settings
}

const retriever = async (url, token) => await request.get(parseRequestSettings(url,token))

module.exports = retriever<commit_msg>solved issue of not returned request but only promise due await<commit_after>const request = require('request-promise-native')

const parseRequestSettings = (url, token) => {
    let settings = { 
        url: url, 
        headers: {
            'User-Agent': 'request',
            Accept: 'application/octet-stream'
        }
    }
    if(token)
        settings.auth = {
            bearer: token,
            sendImmediately: true
        }
    return settings
}

const retriever = (url, token) => request.get(parseRequestSettings(url,token))

module.exports = retriever
{'fraction_non_alphanumeric': 0.10971223021582734, 'fraction_numerical': 0.0, 'mean_word_length': 2.2831858407079646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1151698', 'n_tokens_mistral': 318, 'n_tokens_neox': 311, 'n_words': 73}