-- Leo's gemini proxy

-- Connecting to g.codelearn.me:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

CURL get formatted JSON


Hey,


Sometimes I check HTTP responses with CURL so it would be great to format JSON responses.


There is cool command line JSON parser and you can pipe CURL output to it like that:


`curl http://some.endpoint/with-json-response | jq '.'`


I've wrote useful function called `jcurl` that is basically wrapper on that command above:


function jcurl() {
    curl "$@" | jq '.'
}

P.S. Don't forget to source your `(bash|zsh|any)rc`.

-- Response ended

-- Page fetched on Sat May 11 10:46:15 2024