Comments (2)
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.
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)
- My two cents HOT 7
- Using InterfaceProxy to extract peerCertificates fails (assertion error)
- What is the status of this project HOT 5
- Build fails
- Module cannot be read
- Escape Character %2F in Path Parameter of RestInterface Leads to 404 HOT 3
- websockets - calling dataAvailableForRead can cause errors
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 vibe-http.