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

Timeout #2

Open
carrbrpoa opened this issue Apr 20, 2017 · 0 comments
Open

Timeout #2

carrbrpoa opened this issue Apr 20, 2017 · 0 comments

Comments

@carrbrpoa
Copy link

carrbrpoa commented Apr 20, 2017

Hello,

I'm trying to reproduce a POST request which I'm being able to do with ARC (Chrome's plugin, marking "Use XHR" flag) and when I try with xhr-request, I stop on timeout:

var myformdata = {
	UserName: 'abc',
	Password: 'def',
	OtherData: 'ghi'
};
var formData = querystring.stringify(myformdata);

xhrRequest('http://theserver:9876/path/path/path', {
	method: 'POST',
	json: false,
	body: formData,
	responseType: 'text',
	headers: {
		'Content-Type': 'application/x-www-form-urlencoded'
	}
}, function (err, data) {
	if (err) {
		throw err;
	}
	console.log('got result: ', data);
});

The error:

Error: connect ETIMEDOUT theserver:9876
    at Object.exports._errnoException (util.js:1012:11)
    at exports._exceptionWithHostPort (util.js:1035:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)

Any ideas?

Thanks

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

1 participant