Skip to content
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

Does this crate work with multipart/mixed ? #24

Closed
Armiixteryx opened this issue Jan 8, 2021 · 1 comment
Closed

Does this crate work with multipart/mixed ? #24

Armiixteryx opened this issue Jan 8, 2021 · 1 comment

Comments

@Armiixteryx
Copy link

Hello.

I would like to know if this crate can work with multipart/mixed data. I am consuming a REST API whose response is in the following format:

--simple_boundary 
Content-type: application/json

[JSON HERE]
--simple_boundary 
Content-Disposition: form-data
Content-type: application/octet-stream
Content-Transfer-Encoding: base64
Content-ID:[ID]

[LONG B64 HERE]
--simple_boundary--

This is the content-type header:

"content-type": "multipart/mixed; boundary=\"simple_boundary\""

I am using reqwest 0.10.10 to send the request to API and to get the response in a stream of bytes as required to multer, but when calling next_field fn I get the following error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: multer: Multipart stream is incomplete'

Then I am not sure if because the content-type says the response is multipart/mixed multer won't work with this response.

Thank you for your help on this. All the best!

@Armiixteryx Armiixteryx changed the title Does this crate work with multipart/form-data ? Does this crate work with multipart/mixed ? Jan 9, 2021
@Armiixteryx
Copy link
Author

Closing this since real issue is inside #25 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant