How to use curl command line to access access several URL with cookies


Please briefly explain why you feel this question should be reported .

Report Cancel

I would like to use curl command interface to access/post a website information. However, the website require login and several set-cookies process.

Step1. Login to https://a.a.a.a/login.asp
response: set-cookes: cookieA

Step2. go to https://a.a.a.a/b.asp
response: set-cookes: cookieB

Step3. Post to a.a.a.a/d.asp with Multipart-form data

Question: how could I maintain the cookies received from Step1,2 with Shell script?

0 Answer 8 views 0