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 } }
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
:Or specify the raw JSON as value with
:=
:I like this way:
It is preferrable because it has the same prefix as the related commands, and so it is convenient to find the commands with
Ctrl+R
in bash:If you have
fishshell
, which doesn't have Here Strings, I can propose the following workaround: