Open ericlovescode opened 9 years ago
Does it perhaps get to line 55 in transport.js
. On line 55 an "error" event listener is registered that should trigger the callback with any error information. Perhaps try adding debugging in line 55 section to see if it hits that block of code.
Thanks for this, Chris. No it does not go into the req.on('error'... handler. It basically bypasses the http.request returning function body and carries on after line 50. Very strange as it was a piece-of-cake getting your module to work in my 1st app. 2nd app is very similar.
You perhaps running a different version of NodeJS on your second app?
Also, try and change the code on line 59 to:
// Finalize the request
req.end(options.method == "POST" ? args : '', 'utf8', function () {
console.log('request stream done');
});
That callback should trigger. It will indicate that the request has been sent. The http.request
callback will only trigger once end
has been called, since that flushes the last of the data and finishes the request.
Strange Error. I've got this module working fine in another node.js app. I have created another app and when it gets to line 36 in transport.js: var req = http.request(options, function (res) {
the line just does not get executed, and putting a console.log statement within the associated function block (line 37) doesn't get executed. The userid, password, and apiID are all correct.
Any ideas?