For reference, curmudgeonly. We all love a good curmedgeonly old fart, sometimes that’s exactly what cURL is, it has after all been around for a long time in tech years!
The straight usage of curl does a get against the URI and returns the response body of the request made.
curl -i http://0.0.0.0:8080/hello/Adron
curl --include http://0.0.0.0:8080/hello/Adron
The -i returns the header info of the response of the request made. It is the same as the –include option.
curl -H "connection: close" http://0.0.0.0:8080/hello/Adron
This curl command adds the connection: close option to the GET request to the curl command. The server then, instead of leaving the connection open afterwards immediately closes the connection and shows this in the response.
The commands above can be combined, as can others, into commands such as this.
curl -iH "connection: close" http://0.0.0.0:8080/hello/Adron