OS/Unix & Linux

LINUX|리눅스 쉘에서 URL 실행하기 - curl 명령어

어느가을빛 2016. 3. 21. 17:28

리눅스에는 curl 이라는 http 메시지를 쉘상에서 요청하여 결과를 확인하는 명령어


1. POST 메소드 사용

shell>curl -d "req=12312" "http://111.111.111.111:8080/service.jsp"

(curl -d 옵션 "요청내용(파라미터등)" URL) 


2. GET 메소드 사용

shell>curl "http://111.111.111.111:8080/service.jsp?req=1234"



기타 옵션

  -i 는 결과에서 header 와 body 표시.

  -I 는 결과에서 header 만 표시