reference:
http://idratherbewriting.com/learnapidoc/docapis_understand_curl.html
Using @json_file_name to post json
http://idratherbewriting.com/learnapidoc/docapis_understand_curl.html
Using @json_file_name to post json
curl -H "Content-Type: application/json" -H "Authorization: 123" -X POST -d @mypostbody.json http://endpointurl.com/example
curl -i google.comJust header:
curl -I http://example.comSpecify action:
HTTP Request Methods
POST PUT GET DELETE
curl -X GET http://example.comFull example:
curl -X GET -H "Cache-Control: no-cache" -H "Postman-Token: 930d08d6-7b2a-6ea2-0725-27324755c684" "http://api.openweathermap.org/data/2.5/weather?zip=95050%2Cus&appid=fd4698c940c6d1da602a70ac34f0b147&units=imperial"
curl -H "Authorization: Bearer RsT5OjbzRn430zqMLgV3Ia" \ https://api.authorization-server.com/1/me
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.