mscdex / dicer

A very fast streaming multipart parser for node.js
MIT License
186 stars 37 forks source link

Constructing multipart requests #20

Closed samuel-crypto closed 5 years ago

samuel-crypto commented 5 years ago

This library supports parsing multipart requests very well, but I don't see any routines for constructing such requests. What do you think of adding this function? Or did you intend for this to go purely in one direction?

mscdex commented 5 years ago

That's outside the scope of this project. However, generating a multipart form is pretty trivial though.

samuel-crypto commented 5 years ago

@mscdex Not a multipart form but a multipart response. For example I am implementing a protocol which uses multipart/mixed responses where every part has certain protocol significance and currently I need one utility for reading multipart and another for writing it, do you think it would be reasonable, considering its a stream (like e.g. gzip or crypto) to go both ways? Both aforementioned gzip and crypto do allow this (though it might be harder with multipart). I would be willing to contribute code if you do change your mind.

On Mon 23 Sep 2019, 13:45 mscdex, notifications@github.com wrote:

Closed #20 https://github.com/mscdex/dicer/issues/20.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mscdex/dicer/issues/20?email_source=notifications&email_token=AIAFVDC23VU5LWXG5UQL7YTQLD6EXA5CNFSM4IZMT5V2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTZCTBRQ#event-2655334598, or mute the thread https://github.com/notifications/unsubscribe-auth/AIAFVDCRBXK4R34W3KS4S6TQLD6EXANCNFSM4IZMT5VQ .