2

I am very new to http commands and apache bench, trying to do a simple benchmark. I had a question about how to send a json file usine httpie.

I saw an old example that used an older cli to do it like this:

http --verbose post example.org file.json --content-type="application/json"

However, I am unsure how to do this in httpie. I know that this part:

http --verbose post example.org

Would remain the same. But I don't know how I would do:

file.json --content-type="application/json

in httpie

zet
  • 71
  • 2
  • 8

1 Answers1

4

This is the simplest HTTPie command for sending a JSON file:

$ http example.org @file.json

https://github.com/jkbrzt/httpie#request-data-from-a-filename

Jakub Roztocil
  • 15,930
  • 5
  • 50
  • 52
  • Very concise and simple explanation. Thank you very much! The end result was: http --verbose post example.org @file.json – zet Aug 02 '16 at 15:54