curl 명령어

김대희·2022년 12월 28일
0

curl 명령어

#호출
curl www.google.com

#상세조회
curl -v www.google.com

#-L 리다이렉트 따라가기
curl -L www.google.com

#-X 메서드 지정
#POST, GET, PUT, DELETE 메서드 지정
curl -X GET -L https://www.google.com/search?q=microservice

#POST, PUT 메서드는 body에 메세지를 담아서 보내야할때
#-d, --data 옵션을 이용

curl -X POST -d "search=microservice" https://www.google.com

#-H 헤더지정
curl -H "Content-Type: application/json"

profile
반갑습니다.

0개의 댓글