-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multipart support to RequestBuilder #4
Comments
My current thinking is to add a |
A |
What the status of this issue? I'd like to use multipart with reqwest. |
The status is all here in the issue. The question is on how should the API look for adding it. |
I see. So, could I suggest a new API? I'd like to have a explicit |
@seanmonstar Any blockers from |
@abonander if there is a blocker, I'm not aware of it. I admit I haven't had much time to look into the this issue yet. As for the suggested API comment, having |
There are already a few multipart related crates around: https://crates.io/search?q=multipart Maybe that could help, or be an inspiration. |
How can I send multipart requests with this library now? I can't get it to work, sadly. |
@voider1 this issue is still open, no one has been motivated enough to implement it. |
What you could do as a workaround is to use one of the crates here https://crates.io/search?q=multipart and simply encode the request body yourself. Once you have the encoded bytes, you can send them using reqwest. |
@seanmonstar I'll give it a try, if you have any suggestions I'd like to hear them. I will be taking the suggested approach from this issue to implement it. |
I think I basically finished the For now I have made a macro called |
@voider1 it'd be better if there was only 1 function that was ultimately called. There's some other work to introduce a |
If you're using |
@seanmonstar Should I just implement the @abonander Thanks for mentioning it, but I am not using a crate for this. Implementing multipart/form-data requests myself seems easier and is trivial. I didn't take much time to look at multipart crates and when I did I couldn't get it working with Reqwest. |
@voider1 I've merged the I wonder though, if having made all the builder methods return |
Thought some more, I retract what I said, even though the builder uses |
@seanmonstar Yes, I've implemented them in such a way that |
On the off chance it's useful for anyone, I threw together a quick-and-dirty example of manually using the |
make event fields work a little better
This can probably use the multipart crate, unsure the most ergonomic API to actually expose.
The text was updated successfully, but these errors were encountered: