Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Uploading multipart/form-data with Boundary #199

Closed
unbalancedparentheses opened this Issue · 2 comments

3 participants

@unbalancedparentheses

I couldn't find a way of uploading a multipart/form-data file that has a particular Boundary.

In curl I would do:
curl -vX POST http://localhost:4000/images -u 13:13 -H "Content-Type: multipart/form-data; Boundary=---XXX---" --data-binary @multipart

Is this supported by httpie?

Thanks in advance

@sigmavirus24

It isn't supported by httpie likely because it isn't directly supported by requests (not in a nice way at least).

@jakubroztocil

@pyotrgalois Does the ./multipart file contains the payload including the boundary? If yes, then you can use this command to upload the data from the file and specify the boundary in the Content-Type header:

$ http -v localhost:4000/images \
    'Content-Type: multipart/form-data; Boundary=---XXX---'  < ./multipart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.