No there's nothing built into core for this. The core apis actually want to 
encourage streaming and it's generally considered the more efficient 
pattern. There are lots of modules like the one you found that make it easy 
to accumulate the streamed data chunks. If you are making an http calls, 
you could just use the "request" module which has that built in. The core 
fs module also has apis for collecting the entire contents of files you 
read in, e.g. fs.readFile.

As I'm typing this out, I can see how it seems inconsistent and could be a 
bit confusing. But in general, the core apis don't want to dictate this 
kind of thing. You just find a good module that you trust and use that. 
Another popular one is event-stream https://npmjs.org/package/event-stream. 
Good luck and feel free to ask more specific questions here.

:Marco

On Monday, June 17, 2013 8:45:55 AM UTC-7, Alan Gutierrez wrote:
>
> What is the easiest way to slurp an HTTP GET request body into a string? 
> Or, 
> even better, what is a general purpose way to slurp any readable stream 
> into a 
> string? 
>
> I've been using this library: 
>
>   https://github.com/jeffbski/accum 
>
> Which kindly lists other libraries that do the same. I'm wondering if 
> there 
> isn't something in the core that does this already, or if there is a terse 
> idiom 
> for string slurping that I'm not aware of. 
>
> -- 
> Alan Gutierrez ~ @bigeasy 
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to