When I send a POST request I'm getting back a Buffer in the request body. How do I handle this?
body: < Buffer > }
It's a string or binary buffer, depending on what you requested. In most cases you'd just do response.body.toString().
Is that what you mean?
Well the problem is that I know for sure that the request should take 3 to 5 minutes to get a response and this is what I get after 20 seconds; as if it is prematurely timing out. (even if timeout option is set to 0).
And what do you get with console.log(resp.body.toString()); ?
I can see that the response is empty (0 bytes) though. Unless the first argument is an Error, it means that the request was successful.
The request I'm sending creates virtual machines and the response has the credentials. I've just run out off space though and I don't have the permissions to delete; so I'll have to test again tomorrow.
Sure, let me know if there's any way I can help.
Hi, were you able to take a look at this?
Yes I did. It seemed to be a problem with the external service; not Needle.