开发者

curl + sessions

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜