Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 535 Bytes

curl.md

File metadata and controls

19 lines (13 loc) · 535 Bytes

Do a POST request with JSON data:

curl --location --request POST --header 'Content-Type: application/json' --data '{"foo":"bar"}' 'https://example.org/api/'

Do a POST request with form data:

curl --location --request POST --header 'Content-Type: application/x-www-form-urlencoded' --data 'foo1=bar1&foo2=bar2' 'https://example.org/api/'

Do a GET request with query string parameters:

curl --location --request GET 'https://example.org/api/?foo1=bar1&foo2=bar2'