$ curl -I https://auth.example.com --cookie-jar ./cookie.txt --basic --user somedude 200 OK [...] Set-Cookie: session=mdkfUHAUnjdfj[...] path=/; expires=Sat, 15 Apr 2017 04:08:35 -0000; secure; HttpOnly [...] $ cat ./cookie.txt # Netscape HTTP Cookie File # https://curl.haxx.se/docs/http-cookies.html # This file was generated by libcurl! Edit at your own risk. #HttpOnly_auth.example.com FALSE / TRUE 1492227302 session mdkfUHAUnjdfj[...]