You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Duplicating the issue I opened on http (httprb/http#175), because it seems to be more relevant here:
Apologies if this already exists, but I haven't found any references to it.
Sometimes one needs to send data via multipart/related. This, so far, has been a huge pain in the ass, with almost every other ruby HTTP solution.
Comparatively, other libraries, such as Node.js' request make it downright simple. If we could get something similar to request's level of multipart/related support, it would be awesome. They not only solve the initial issue of crafting multiparts, but they go above and beyond and let you deal with some implementation caveats.
Thanks!
The text was updated successfully, but these errors were encountered:
I second the request, I had to use multipart/mixed recently and had to roll my own custom solution.
Ideally it would also be possible to add custom headers (like Content-Type and Content-Disposition) to body parts.
Maybe FormData is not the right place to do this, since this isn't strictly related to 'forms' anymore. I could imagine separating Multipart handling out as a gem and having FormData at a higher abstraction level. That is, one can use FormData for the 95% of the cases where the default use case is enough, and provide a lower-level Multipart class which just deals with concatening body parts correctly etc. and let the user add custom body parts with custom headers.
I don't really know all that much about HTTP, so I don't know if this made sense. :)
Well, initial idea of this gem was to just support emitting of multipart/form-data, but since very first release, I realized I would like it to provide a silver bullet for both emitting and parsing of request/response bodies of different types including www-urlencoded one. So I'm open for a Pull-Request (even a sketch will help a lot) as I don't have time right now to do this myself...
Duplicating the issue I opened on http (httprb/http#175), because it seems to be more relevant here:
The text was updated successfully, but these errors were encountered: