Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy timeouts #29

Open
aleksandarkok opened this issue Mar 23, 2018 · 1 comment
Open

Proxy timeouts #29

aleksandarkok opened this issue Mar 23, 2018 · 1 comment

Comments

@aleksandarkok
Copy link

Hi,
this is my request, it works without .proxy(proxy), but with it timeouts. I have tried several proxy IPs.

const request = require('superagent');
require('superagent-proxy')(request);

let proxy = 'http://217.9.91.39:8080';

request
.post('https://xxx.net/')
.proxy(proxy)
.timeout(1000)
.set('Access-Control-Allow-Origin', '*')
.type('form')
.set('Accept-Language', 'SRB')
.set('Authorization', 'xxxxxxxxxxxxxxxxxx')
.send('code='+kod)
.end((err, res) => {
if (err) {
console.log('ERR',err);
} else {
console.log(res.status, res.headers);
console.log(res.body);
}
});

{ Error: Timeout of 1000ms exceeded
at RequestBase._timeoutError (C:\Users\akokanovic\Documents\NetBeansProjects\NodeJS\NodeJsApplication\node_modules\superagent\lib\request-base.js:670:13)
at Timeout. (C:\Users\akokanovic\Documents\NetBeansProjects\NodeJS\NodeJsApplication\node_modules\superagent\lib\request-base.js:685:12)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)
timeout: 1000,
code: 'ECONNABORTED',
errno: 'ETIME',
response: undefined }

@zpzxgcr
Copy link

zpzxgcr commented Jun 15, 2018

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants