RESTful and SOAP calls

From Ever changing code
Revision as of 11:09, 27 September 2016 by Pio2pio (talk | contribs) (Created page with "= Use curl to test RESTful API = curl --insecure -X GET \ --header "Accept: application/json" \ --header "Authorization: Bearer geasrExampleTokengwsdvb" \ <nowiki>"htt...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Use curl to test RESTful API

curl --insecure -X GET \
 --header "Accept: application/json" \
 --header "Authorization: Bearer geasrExampleTokengwsdvb" \
 "https://host1.aws.example.com/ApiBaseLocation/v1/ApiName/Value"

Options explained

  • --insecure disables ssl checks like the certificate chain check, etc.
  • -X, --request <command> it defaults to GET commands, check HTTP1.1 specification for more
  • -H, --header <header> (HTTP) Extra header to include in the request when sending HTTP to a server

References