I'm searching for the syntax to write a PUT
operation that upload a file with HTTPie. Please could you point me to the right syntax ? I could not find a way to do so on the official documentation
To achieve this with httpie, you need to do two things:
PUT
, which is trivial: $ http PUT […]
Redirected input:
$ http PUT httpbin.org/put Content-Type:image/png < /images/photo.png
Request data from a filename (automatically sets the Content-Type
header):
$ http PUT httpbin.org/put @/images/photo.png
Form file upload:
$ http --form PUT httpbin.org/put photo=@/images/photo.png
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With