Closed shafr closed 12 months ago
Yes, since cookies are just headers, you can use the -H
flag to add an extra header. For example: -H "Cookie: key=val"
@matusf Please add to readme the setting cookies part, so people would not be confused:
curl google.com \
-H "Cookie: A=1" \
-H "Cookie: B=2" \
-H "Cookie: C=3"
It works with a single -H line like this (basically you copy cookie line from your browser developer tab & prepend -H and wrap in quotes):
-H "Cookie: A=1; B=2; C=3;"
Is there a way how to set up cookies for the session, so they would be authenticated ?