Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For headers alone, use a HEAD request with `curl --head`, short form `curl -I`. `curl -D-` emits the body as well, which is just noise if you’re only interested in the headers.


A HEAD request doesn’t necessarily return the same headers as the corresponding GET request. Just use -o/dev/null to suppress the body (which I omitted for brevity).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: