diff --git a/README.md b/README.md index a2a84a7..56efb68 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud). -_987 TILs and counting..._ +_988 TILs and counting..._ --- @@ -908,6 +908,7 @@ _987 TILs and counting..._ - [Copying File Contents To System Paste Buffer](unix/copying-file-contents-to-system-paste-buffer.md) - [Copying Nested Directories With Ditto](unix/copying-nested-directories-with-ditto.md) - [Create A File Descriptor with Process Substitution](unix/create-a-file-descriptor-with-process-substitution.md) +- [Curl With Cookies](unix/curl-with-cookies.md) - [Curling For Headers](unix/curling-for-headers.md) - [Curling With Basic Auth Credentials](unix/curling-with-basic-auth-credentials.md) - [Display All The Terminal Colors](unix/display-all-the-terminal-colors.md) diff --git a/unix/curl-with-cookies.md b/unix/curl-with-cookies.md new file mode 100644 index 0000000..3effb48 --- /dev/null +++ b/unix/curl-with-cookies.md @@ -0,0 +1,15 @@ +# Curl With Cookies + +Some endpoints require certain cookies to be included in order to get the +response you are looking for. For instance, if the endpoint is authenticated +with a session cookie, then you will need to provide that session cookie when +curling. + +The `-b` flag can be used to instruct `curl` to include a cookie in the header +of a request. + +```bash +$ curl -b session=abc123SessionToken https://authenticated-url.com +``` + +See `man curl` for more details and other flags.