Skip to main content
3 of 4
Stick to the facts. Clarify that HTTPie does JSON encoding for you, add example of reading data from file.
Mark Stosberg
  • 13.5k
  • 6
  • 48
  • 49

HTTPie is a recommended alternative to curl because you can do just

$ http POST http://example.com/some/endpoint name=value name1=value1 

It speaks JSON by default and will handle both setting the necessary header for you as well encoding data as valid JSON. There is also:

Some-Header:value 

for headers, and

name==value 

for query string parameters. If you have a large chunk of data, you can also read it from a file have it be JSON encoded:

 [email protected] 
Anthony
  • 2.1k
  • 23
  • 24