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

Uploading multipart/form-data with Boundary #199

Closed
unbalancedparentheses opened this issue Jan 30, 2014 · 2 comments
Closed

Uploading multipart/form-data with Boundary #199

unbalancedparentheses opened this issue Jan 30, 2014 · 2 comments

Comments

@unbalancedparentheses
Copy link

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
Copy link

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

@jkbrzt
Copy link
Member

jkbrzt commented Apr 10, 2014

@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

@jkbrzt jkbrzt closed this as completed Apr 24, 2014
rocketraman added a commit to rocketraman/spring-restdocs that referenced this issue Mar 7, 2016
NOTES:

* Httpie does not currently support setting the content type for each
  part in a multipart form -- these multipart types are currently
  ignored. See:

  httpie/cli#199
  httpie/cli#271
  httpie/cli#285
  httpie/cli#398

* There is an issue with specifying piped input for multipart form data.
  There is no way currently to specify the data without specifying a
  filename parameter in the Content-Disposition. For now, this is
  ignored. See:

  httpie/cli#342
rocketraman added a commit to rocketraman/spring-restdocs that referenced this issue Mar 7, 2016
NOTES:

* Httpie does not currently support setting the content type for each
  part in a multipart form -- these multipart types are currently
  ignored. See:

  httpie/cli#199
  httpie/cli#271
  httpie/cli#285
  httpie/cli#398

* There is an issue with specifying piped input for multipart form data.
  There is no way currently to specify the data without specifying a
  filename parameter in the Content-Disposition. For now, this is
  ignored. See:

  httpie/cli#342
rocketraman added a commit to rocketraman/spring-restdocs that referenced this issue Mar 7, 2016
NOTES:

* Httpie does not currently support setting the content type for each
  part in a multipart form -- these multipart types are currently
  ignored. See:

  httpie/cli#199
  httpie/cli#271
  httpie/cli#285
  httpie/cli#398

* There is an issue with specifying piped input for multipart form data.
  There is no way currently to specify the data without specifying a
  filename parameter in the Content-Disposition. For now, this is
  ignored. See:

  httpie/cli#342
rocketraman added a commit to rocketraman/spring-restdocs that referenced this issue Mar 7, 2016
NOTES:

* Httpie does not currently support setting the content type for each
  part in a multipart form -- these multipart types are currently
  ignored. See:

  httpie/cli#199
  httpie/cli#271
  httpie/cli#285
  httpie/cli#398

* There is an issue with specifying piped input for multipart form data.
  There is no way currently to specify the data without specifying a
  filename parameter in the Content-Disposition. For now, this is
  ignored. See:

  httpie/cli#342
wilkinsona pushed a commit to spring-projects/spring-restdocs that referenced this issue Mar 9, 2016
This commit adds support for generating a snippet that contains
the HTTPie command for the request. As the snippet does not require
any additional configuration, it has added to the existing default
snippets.

Httpie does not currently support setting the content type for each
part in a multipart form -- these multipart types are currently
ignored. See:

    httpie/cli#199
    httpie/cli#271
    httpie/cli#285
    httpie/cli#398

There is an issue with specifying piped input for multipart form
data. There is no way currently to specify the data without specifying
a filename parameter in the Content-Disposition. For now, this is
ignored. See:

    httpie/cli#342

See gh-207
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