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, |
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, |
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, |
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, |
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 async = require('async') // <-- | |
const Agent = require('agentkeepalive') | |
const httpsAgent = new Agent.HttpsAgent({ | |
keepAlive: true, | |
maxSockets: 100, | |
socketActiveTTL: 30 * 60 * 1000 | |
}) | |
const request = require('request-promise').defaults({ |
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, |
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 request = require('request-promise').defaults({ | |
resolveWithFullResponse: true, | |
forever: true // <-- | |
}) | |
request('https://www.vivareal.com.br/') | |
.then(response => { | |
console.log('statusCode:', response && response.statusCode) | |
}) |
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 httpAgent = new Agent({ | |
keepAlive: true, | |
maxSockets: 100 | |
}) | |
const zlib = require('zlib') // <-- | |
const request = require('request-promise').defaults({ |
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 | |
}) | |
const request = require('request-promise').defaults({ | |
resolveWithFullResponse: true, | |
agent: httpsAgent, |
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 // <-- | |
}) | |
const request = require('request-promise').defaults({ | |
resolveWithFullResponse: true, | |
agent: httpsAgent // <-- |