[nodejs] Re: Implement multipart/mixed parser

2017-03-29 Thread Joe David
You can use a baisc http parser like this: https://www.npmjs.com/package/http-message-parser On Monday, 7 April 2014 04:26:24 UTC+3, Hendrik Cech wrote: > > Hey, > > I'm currently trying to make multipart/mixed requests and parse the > responses. The format is explained here: >

[nodejs] Re: Implement multipart/mixed parser

2014-04-08 Thread Floby
I looked into this a bit further. Unfortunately busboy won't help you as it only handles multipart/form-data bodies. However dicer could easily do the trick for parsing requests. However, if you need to generate a payload against this API, maybe partly [1] can help you.

[nodejs] Re: Implement multipart/mixed parser

2014-04-08 Thread Hendrik Cech
Yep, dicer looks great for getting the response parts. Thanks, I will take a look at partly. Unfortunately the code needs to run in the browser as well. I can't make use of the http module therefore. For reference, this would be a good starting point otherwise:

[nodejs] Re: Implement multipart/mixed parser

2014-04-08 Thread mscdex
On Tuesday, April 8, 2014 4:14:34 AM UTC-4, Hendrik Cech wrote: Unfortunately the code needs to run in the browser as well. I can't make use of the http module therefore. You may want to check how various browsers handle a multipart/mixed response first. Some may not give you the entire

[nodejs] Re: Implement multipart/mixed parser

2014-04-08 Thread Hendrik Cech
You may want to check how various browsers handle a multipart/mixed response first. Some may not give you the entire response, some may just give you the last part, others may do something entirely different. The latest versions of Chrome, Firefox and Safari on OS X are looking good

Re: [nodejs] Re: Implement multipart/mixed parser

2014-04-07 Thread Simeon Chaos
Maybe you can have a look at https://github.com/chaosim/peasy, which is a simple parser, or a simple method to write a parser. peasy is not based on stream, maybe you can write yourself a parser based on stream by using the method that peasy has demonstrated. 在

Re: [nodejs] Re: Implement multipart/mixed parser

2014-04-06 Thread Hendrik Cech
Dicer looks great, thank you. The bigger problem still remains: I need to parse the parts contents. They are http responses themselves. 2014-04-07 16:00 GMT+12:00 mscdex msc...@gmail.com: On Sunday, April 6, 2014 9:26:24 PM UTC-4, Hendrik Cech wrote: I'm currently trying to make