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

Buffer #43

Closed
tiangooden opened this issue Dec 4, 2013 · 7 comments
Closed

Buffer #43

tiangooden opened this issue Dec 4, 2013 · 7 comments

Comments

@tiangooden
Copy link

When I send a POST request I'm getting back a Buffer in the request body. How do I handle this?

{ ...
resume: [Function],
read: [Function],
bytes: 0,
body: < Buffer > }

@tomas
Copy link
Owner

tomas commented Dec 4, 2013

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?

@tiangooden
Copy link
Author

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).

@tomas
Copy link
Owner

tomas commented Dec 4, 2013

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.

@tiangooden
Copy link
Author

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.

@tomas
Copy link
Owner

tomas commented Dec 4, 2013

Sure, let me know if there's any way I can help.

@tomas
Copy link
Owner

tomas commented Mar 5, 2014

Hi, were you able to take a look at this?

@tiangooden
Copy link
Author

Yes I did. It seemed to be a problem with the external service; not Needle.

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