Httpie: How does one upload a picture using httpie ?

Created on 4 May 2015  ·  1Comment  ·  Source: httpie/httpie

the example in the doc only use a txt file, but if you try with a binary format (an image for example it complains )

http --form POST localhost:7777 avatar=@valid_avatar.jpg
question

Most helpful comment

Form file fields use @ as the key-value separator (=@ is for embedding of the contents of text and JSON files):

$ http --form :7777 avatar@valid_avatar.jpg

Docs:

>All comments

Form file fields use @ as the key-value separator (=@ is for embedding of the contents of text and JSON files):

$ http --form :7777 avatar@valid_avatar.jpg

Docs:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

filipesperandio picture filipesperandio  ·  3Comments

jclem picture jclem  ·  6Comments

Abdallah-Obaid picture Abdallah-Obaid  ·  4Comments

rashthedude picture rashthedude  ·  3Comments

maciej picture maciej  ·  4Comments