Pretty-Printing JSON Response with HTTP Headers

from blog Susam Pal, | ↗ original
Often while using curl with URLs that return a JSON response, I need to print the HTTP response headers along with the JSON response. Here is an example that shows how this can be done: $ curl -sSi https://susam.net/code/lab/json/book.json HTTP/1.1 200 OK Server: nginx/1.18.0 Date: Sun, 14 Apr 2024 22:20:49 GMT Content-Type: application/json...