您可以通过传递整个JSON
stdin:
$ echo '{ "user": { "name": "john", "age": 10 } }' | http httpbin.org/post或者使用以下命令将原始JSON指定为值
:=:
$ http httpbin.org/post user:='{"name": "john", "age": 10 }'
您可以通过传递整个JSON
stdin:
$ echo '{ "user": { "name": "john", "age": 10 } }' | http httpbin.org/post或者使用以下命令将原始JSON指定为值
:=:
$ http httpbin.org/post user:='{"name": "john", "age": 10 }'