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

Can order between JSON and files be controlled in multipart form? #903

Closed
msageryd opened this issue Apr 24, 2020 · 5 comments
Closed

Can order between JSON and files be controlled in multipart form? #903

msageryd opened this issue Apr 24, 2020 · 5 comments

Comments

@msageryd
Copy link

I'm wondering if the order between JSON fields and file attachments can be controlled.

I need to test my api by having files come before JSON data in the stream. It seems that httpie always sends JSON first and then files.

@jkbrzt
Copy link
Member

jkbrzt commented Apr 25, 2020

Currently it's not possible but I'll see if something can be done about that.

@msageryd
Copy link
Author

msageryd commented Apr 29, 2020

@jakubroztocil That would be awesome. This should be useful for everyone with my use case.

My use case:

  • Receiving multipart form via email
  • Attached files needs to be processed
  • Email needs to be validated by checking field data

In some rare cases I'm receiving files before fields (I'm using Sendgrid mail parse). When this happens I need to buffer the files and wait for the fields in order to know what to do with the files.

It would be great to use httpie to test this edge case.

@httpie httpie deleted a comment May 2, 2020
@JJCCALDERON
Copy link

You can't

@jkbrzt jkbrzt closed this as completed in 6925d93 Sep 28, 2020
@jkbrzt
Copy link
Member

jkbrzt commented Sep 28, 2020

@msageryd HTTPie in master preserves the field ordering (will be included in v2.3.0).

@msageryd
Copy link
Author

msageryd commented Sep 28, 2020 via email

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

3 participants