Git Product home page Git Product logo

Comments (2)

s-ludwig avatar s-ludwig commented on August 20, 2024

There is currently no high-level implementation for this, so the request body would have to be composed manually. I initially thought there was an implementation, but that was just some e-mail composition code ("multipart/mixed", "multipart/alternative", "multipart/related") that we are using internally. The API of that isn't really suitable for use with the HTTP client, though, so it doesn't make much sense to take that.

As for writePart, it has been too long since it has been added like that and I honestly didn't even know it existed. However, as is, it doesn't look like a useful approach - I'd remove it together with the MultiPart struct. As a baseline, I'd probably go for something that writes everything at once, such as writeMultiPartForm(FormFields form_fields, FilePartFormFields files) (consistent with vibe.inet.webform.parseMultPartForm), or writeMultiPartForm(DictionaryList!MutiPartFormField fields), where MultiPartFormField is a TaggedUnion of union { string text; FilePart file; }.

vibe.inet.webform.FilePart may need a little overhaul for that (the tempPath member doesn't have a fitting name for this use case and it might be desirable to pass a generic input range instead), but as long as that can be done as incremental improvements, this could be a separate undertaking. The core implementation of all of this should also be in vibe.inet.webform.

Contributions here are certainly welcome!

from vibe-http.

vnayar avatar vnayar commented on August 20, 2024

I made two initial PRs, both in their early stage of development. Between the original RFCs and Vibe's own architecture, there's a lot going on, so I wanted to get some early feedback to make sure I'm on the right path and not too far off track.

from vibe-http.

Related Issues (8)

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.