Conversation
|
This should be merged after #1 if at all. |
|
That there http module is the one that comes with core nodejs. Docs over here. I actually was using the request module at first, can't remember exactly why I dropped it. Maybe for the sake of not adding a dependency that was easily done by using the http lib. However, if that http library is being squirely with post, I'm fine with adding request back in. It is pretty standard. |
|
I rebased with merge, but am now getting an error: events.js:72
throw er; // Unhandled 'error' event
^
Error: socket hang up
at createHangUpError (http.js:1472:15)
at Socket.socketOnEnd [as onend] (http.js:1568:23)
at Socket.g (events.js:180:16)
at Socket.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:919:16
at process._tickCallback (node.js:419:13)This makes me want a test suite, since testing just this component is a little touch. I opened open-eio#3 to suggest this. I think the key was this line: postOptions[options.field_name] = options.data;Somehow that kludge was the only way I could get it to work. POST is kinda irrelevant here, but anyways the goal here is to get it to accept a piped string, and the library is just a means to try to get that to work, as in open-eio#1 I guest POST is not a bad idea in general, though, as we begin to send very large datasets, in theory. |
This isn't ready.
I can't get this to work when I pipe a string "Hello world." to it, like:
This is an incomplete and dissatisfying adaptation for POST requests, which I hope will solve this bug. But the
httplibrary is poorly or not documented (or I can't find it) so I'm thinking we ought to switch to the better-supportedrequestlibrary?https://github.com/request/request