1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-04 23:58:01 +00:00

Add Curling For Headers as a unix til

This commit is contained in:
jbranchaud
2016-09-29 23:19:21 -05:00
parent 500357f58e
commit f8e8bd21a6
2 changed files with 17 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really
warrant a full blog post. These are mostly things I learn by pairing with
smart people at [Hashrocket](http://hashrocket.com/).
_474 TILs and counting..._
_475 TILs and counting..._
---
@@ -409,6 +409,7 @@ _474 TILs and counting..._
- [Command Line Length Limitations](unix/command-line-length-limitations.md)
- [Copying File Contents To System Paste Buffer](unix/copying-file-contents-to-system-paste-buffer.md)
- [Create A File Descriptor with Process Substitution](unix/create-a-file-descriptor-with-process-substitution.md)
- [Curling For Headers](unix/curling-for-headers.md)
- [Curling With Basic Auth Credentials](unix/curling-with-basic-auth-credentials.md)
- [Display Free Disk Space](unix/display-free-disk-space.md)
- [Do Not Overwrite Existing Files](unix/do-not-overwrite-existing-files.md)

View 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