开发者

curl + sessions

开发者 https://www.devze.com 2022-12-12 13:58 出处:网络
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 opt

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号