GithubHelp home page GithubHelp logo

Robust multipart/related support? about form_data HOT 2 OPEN

httprb avatar httprb commented on August 31, 2024
Robust multipart/related support?

from form_data.

Comments (2)

Fryie avatar Fryie commented on August 31, 2024

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.

ixti avatar ixti commented on August 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.