I'm making POST requests with CURL, and I would like to output cookies m开发者_运维问答ade during that request... Is that possible? :)
Not sure I follow, but - could you use the -c
or --cookie-jar
option? Use -
to get cookies written to stdout.
Ref: a curl man page
curl's -c
and --cookie-jar
options will handle cookies that are created using Set-Cookie
headers in an HTTP response. Any cookies that are created by JavaScript on a web page will not be handled by curl (or wget, for that matter). So if you're using the -c
and --cookie-jar
options and finding things aren't working, check to see whether the cookies are set by JavaScript or by HTTP headers.
精彩评论