Calling a REST GET API and Parsing JSON/XML Response
This blog post describes a general procedure for writing code that calls an HTTP/HTTPS GET REST API and parses the JSON or XML response. Step 1: Form the CURL Command A GET request in the form of a CURL command will look like this: curl -X GET https://test-api.service.hmrc.gov.uk/organisations/vat/123456789/obligations \ -H “Accept: application/vnd.hmrc.1.0+json” \ -H “Authorization: Bearer hmrc_app_server_token” Some notes: Header […]