Difference between revisions of "Curl -d"
Jump to navigation
Jump to search
(5 intermediate revisions by 3 users not shown) | |||
Line 7: | Line 7: | ||
curl [[-X POST]] https://reqbin.com/echo/post/json | curl [[-X POST]] https://reqbin.com/echo/post/json | ||
− | [[-H]] 'Content-Type: application/[[json]]' | + | [[-H]] '[[Content-Type]]: application/[[json]]' |
-d '{"login":"my_login","password":"my_password"}' | -d '{"login":"my_login","password":"my_password"}' | ||
+ | [[Stop]] <code>[[op-batcher]]</code>: | ||
+ | [[curl -d]] '{"id":0,"jsonrpc":"2.0","[[method]]":"[[admin_stopBatcher]]","params":[]}' \ | ||
+ | -H "[[Content-Type: application/json]]" http://localhost:[[8548]] | [[jq]] | ||
== Related terms == | == Related terms == | ||
Line 15: | Line 18: | ||
* [[application/x-www-form-urlencoded]] | * [[application/x-www-form-urlencoded]] | ||
* [[application/json]] | * [[application/json]] | ||
− | * <code>[[-H]] "Content-Type: [[application/json]]"</code> | + | * <code>[[curl -H]] "Content-Type: [[application/json]]"</code> |
* <code>[[--request POST]]</code> | * <code>[[--request POST]]</code> | ||
* <code>[[docker run -d]]</code> | * <code>[[docker run -d]]</code> |
Latest revision as of 08:01, 21 June 2024
-d, --data HTTP POST data
curl -X POST https://reqbin.com/echo/post/json -H 'Content-Type: application/json' -d '{"login":"my_login","password":"my_password"}'
curl -d '{"id":0,"jsonrpc":"2.0","method":"admin_stopBatcher","params":[]}' \ -H "Content-Type: application/json" http://localhost:8548 | jq
Related terms[edit]
- API
- application/x-www-form-urlencoded
- application/json
curl -H "Content-Type: application/json"
--request POST
docker run -d
See also[edit]
Advertising: