Created
July 6, 2017 04:03
-
-
Save marciorodrigues87/05064f5471932022d1957c3f2913b043 to your computer and use it in GitHub Desktop.
request-config-step-nine.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Agent = require('agentkeepalive') | |
const httpsAgent = new Agent.HttpsAgent({ | |
keepAlive: true, | |
maxSockets: 100, | |
socketActiveTTL: 30 * 60 * 1000 | |
}) | |
const request = require('request-promise').defaults({ | |
resolveWithFullResponse: true, | |
agent: httpsAgent, | |
gzip: true, | |
timeout: 1000, | |
auth: { | |
'user': 'user', | |
'password': 'password', | |
'sendImmediately': true | |
}, | |
headers: { | |
'User-Agent': 'Aplicacao-VivaReal-v1.0.2' // <-- | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment