cURL Cheat Sheet/Send cookies inline

Supply a Cookie header value from the command line.

Section: Request Shaping

Send cookies inline

bash
bash
curl -b 'session=abc123; theme=dark' https://example.com
Explanation

`-b` / `--cookie` can send cookies inline or from a file.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Request Shaping
Store received cookies
Write cookies set by the server into a cookie jar file.
OpenIn sheetbashsame section
Reuse cookies from a cookie jar
Load cookies from a file and save updated cookies back.
OpenIn sheetbashsame section
POST with no body
Send a POST request with an empty body.
OpenIn sheetbashsame section
Use a custom HTTP method
Send a method such as PUT, PATCH, DELETE, or PURGE.
OpenIn sheetbashsame section
Send query parameters in URL
Pass query parameters directly in the URL.
OpenIn sheetbashsame section
Append query parameters with --get
Build a GET query string from data parameters.
OpenIn sheetbashsame section