How do I copy cookies from Chrome?

后端 未结 4 1198
故里飘歌
故里飘歌 2020-12-23 02:01

I am using bash to to POST to a website that requires that I be logged in first. So I need to send the request with login cookie. So I tried logging in and keeping the cooki

4条回答
  •  遥遥无期
    2020-12-23 02:39

    1. Hit F12 to open the developer console (Mac: Cmd+Opt+J)
    2. Look at the Network tab.
    3. Do whatever you need to on the web site to trigger the action you're interested in
    4. Right click the relevant request, and select "Copy as cURL"

    This will give you the curl command for the action you triggered, fully populated with cookies and all. You can of course also copy the flags as a basis for new curl commands.

提交回复
热议问题