Skip to content

Instantly share code, notes, and snippets.

@pauldougan
Created November 26, 2019 16:00
Show Gist options
  • Select an option

  • Save pauldougan/2d6c0a35771abc5eb5d36b430ab97600 to your computer and use it in GitHub Desktop.

Select an option

Save pauldougan/2d6c0a35771abc5eb5d36b430ab97600 to your computer and use it in GitHub Desktop.
HMRC Hello World

curl -v -s -H "Accept: application/vnd.hmrc.1.0+json" https://test-api.service.hmrc.gov.uk/hello/world | jq .

*   Trying 2.22.132.80...
* TCP_NODELAY set
* Connected to test-api.service.hmrc.gov.uk (2.22.132.80) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [234 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [108 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2766 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=GB; L=London; O=HM Revenue & Customs; CN=test-api.service.hmrc.gov.uk
*  start date: Sep 17 00:00:00 2019 GMT
*  expire date: Sep 16 12:00:00 2020 GMT
*  subjectAltName: host "test-api.service.hmrc.gov.uk" matched cert's "test-api.service.hmrc.gov.uk"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert SHA2 Secure Server CA
*  SSL certificate verify ok.
> GET /hello/world HTTP/1.1
> Host: test-api.service.hmrc.gov.uk
> User-Agent: curl/7.54.0
> Accept: application/vnd.hmrc.1.0+json
> 
< HTTP/1.1 200 OK
< Content-Type: application/json
< Cache-Control: no-cache,no-store,max-age=0
< Vary: Accept
< Strict-Transport-Security: max-age=31536000;
< Content-Security-Policy: default-src 'self'
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< Content-Length: 25
< Date: Tue, 26 Nov 2019 15:58:30 GMT
< Connection: keep-alive
< 
{ [25 bytes data]
* Connection #0 to host test-api.service.hmrc.gov.uk left intact
[pauldougan@gds5596 dcs-service-manual (add-architecture-diagram)]$ 2>1  curl -v -s -H "Accept: application/vnd.hmrc.1.0+json" https://test-api.service.hmrc.gov.uk/hello/world | jq . | vi -
Vim: Reading from stdin...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment