Daniel Stenberg daniel.haxx.se

Curl's CLI can now write out JSON  ↦

This does not mean curl can fetch some JSON and print it to STDOUT. That would not be new. What it means is that the --write-out option now supports JSON as an output format. Pipe that output to a tool like jq and you get something like this:

{
  "url_effective": "https://example.com/",
  "http_code": 200,
  "response_code": 200,
  [lots more but I snipped them for length]
}

Which is pretty cool, if you ask me.


Discussion

Sign in or Join to comment or subscribe

0:00 / 0:00