Drake Drake - 2 years ago 96
JSON Question

How to make a post with a from data of empty json through HTTPie?

I'm wondering how to make a POST request with a from data of empty json through HTTPie? The corresponding Curl solution is here:

curl -X POST -H "Content-Type: application/json" -d '{}' http://ooxx.asdf/

Answer Source

Verbatim request data can be specified via redirected STDIN:

$ echo '{}' | http httpbin.org/post

Note that for requests with body:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download