How do I send Cookies using Curl?

Cookies are passed to Curl with the --cookie "Name=Value" command line parameter. Curl automatically converts the given parameter into the Cookie: Name=Value request header. Cookies can be sent by any HTTP method, including GET, POST, PUT, and DELETE, or with any data, including JSON, web forms, and file uploads. In this Curl Cookies example, we send cookies to the ReqBin echo URL. Click Run to execute Curl Send Cookies example online and see results.
Loading...