Live data from Hacker News

Uses for cURL

httpkit.com

1–10 of 75 posts

Re: Uses for cURL

#2
I'm sure there must be other sites documenting this too, but that's a very well written and prioritized bit of documentation - nicely done.

Your echo service is pretty nifty too.

Re: Uses for cURL

#5
> If you only care about headers use the -I flag and the response body will be hidden

That is actually wrong. The -I flag set the request method to HEAD. So in some cases it will return different headers than a normal get request (and some servers don't implement HEAD responses at all).

Re: Uses for cURL

#7
post #5

> If you only care about headers use the -I flag and the response body will be hidden That is actually wrong. The -I flag set the request method to HEAD. So in some cases it will return different headers than a normal get request (and some servers don't implement HEAD responses at all).

Very true, but let's not forget that [0]

> The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.

and that

> The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request.

[0]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

Re: Uses for cURL

#8
post #5

> If you only care about headers use the -I flag and the response body will be hidden That is actually wrong. The -I flag set the request method to HEAD. So in some cases it will return different headers than a normal get request (and some servers don't implement HEAD responses at all).

Ah, great catch. Added a note about having to specify the method explicitly / that -I uses HEAD implicitly. Thanks!
Post reply on HN