MaatDeamon MaatDeamon - 7 months ago 109
JSON Question

Sending nested JSON object using HTTPie

I am trying to use HTTPie to parse to send some nested JSON object, but I can not find how. It is pretty clear how to send a JSON object but not a nested one such as

{ "user": { "name": "john"
"age": 10 } }


You can pass the whole JSON via stdin:

$ echo '{ "user": { "name": "john", "age": 10 } }' | http

Or specify the raw JSON as value with :=:

$ http user:='{"name": "john", "age": 10 }'