Skip to content

Instantly share code, notes, and snippets.

@kevenli
Last active September 23, 2019 05:44
Show Gist options
  • Save kevenli/ee71e8800f90ceb9b8f8a8069e78c235 to your computer and use it in GitHub Desktop.
Save kevenli/ee71e8800f90ceb9b8f8a8069e78c235 to your computer and use it in GitHub Desktop.
extract HEADERS and COOKIES from curl bash cmd (copied from chrome developer tools)

in notepad++

Headers

-H '([a-z\-]*): ([^']*)' 
->
'\1' : '\2', \r\n

Cookies

([0-9a-zA-Z_]+)=([^;]*);?\s*
->
'\1' : '\2', \r\n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment