Comments (2)
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. :)
from form_data.
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...
from form_data.
Related Issues (10)
- Keyword arguments, when were they first used? HOT 3
- buffer encoding issues HOT 13
- Server-side parser. HOT 2
- Custom encoding method HOT 5
- Ensure file is closed after reading if it was passed as Pathname or String
- Yank form_data gems HOT 7
- multipart/form-data work improper when only one form field used.
- Setting Content-Type is not supported on non-file parts
- Creation of file parts without filename is not supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from form_data.