티스토리 뷰

공부

[cURL] login cookie -> call api

승가비 2022. 11. 7. 21:36
728x90
ID=$1
PW=$2

curl \
  -X POST \
  -d "id=${ID}&pw=${PW}" \
  --cookie-jar cookie {login URL}

curl \
  -v \
  --cookie cookie {call API}

https://yougome.tistory.com/452

 

[CURL] linux에서 활용하기

* 쿠기 정보 활용 - 쿠기 정보 저장 :: curl -X POST -d "id=user&password=pwd" --cookie-jar {cache} {URL} - 쿠기 정보 사용 :: curl --cookie {cache} URL * 파일 송수신 하기 - curl --cookie {cache} --from file=@"{filenpath}" --from "----

yougome.tistory.com

https://stackoverflow.com/questions/30760213/save-cookies-between-two-curl-requests

 

Save cookies between two curl requests

I know that using cURL I can see my received cookies / headers by using curl --head www.google.com And I know that I can add headers to my request using curl --cookie "Key=Value" www.google.com ...

stackoverflow.com

 

728x90
댓글