mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 23:28:02 +00:00
Add Curling For Headers as a unix til
This commit is contained in:
15
unix/curling-for-headers.md
Normal file
15
unix/curling-for-headers.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Curling For Headers
|
||||
|
||||
If you want to inspect the headers of a response from some endpoint, look no
|
||||
further than a quick `curl` command. By including the `-I` flag, `curl` will
|
||||
return just the headers.
|
||||
|
||||
For example, if you are developing a web app that is being locally served at
|
||||
`localhost:3000` and you'd like to see what the headers look like for a
|
||||
particular URL, you might try something like the following command:
|
||||
|
||||
```bash
|
||||
$ curl -I localhost:3000/posts
|
||||
```
|
||||
|
||||
h/t Dillon Hafer
|
||||
Reference in New Issue
Block a user