curl 이용하기

linux 2015. 9. 3. 18:49

POST 방식으로 json 날리기

curl http://localhost:8080/api/customers -v -X POST -H "Content-Type: application/json" -d "{\"firstName\":\"kildong\",\"lastName\":\"hong\"}"


curl http://localhost:8080/api/customers -v -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "firstName=kildong&lastName=hong"



GET 방식으로 json 받아오기

curl http://;localhost:8080/api/customers -v -X GET


'linux' 카테고리의 다른 글

Tomcat console log UTF-8 설정.  (0) 2016.05.27
apache에서 tomcat 설정.  (0) 2016.03.29
리눅스 file 사이즈 0 으로 만들기  (0) 2015.07.31
리눅스 find cp 혼합  (0) 2015.07.29
traceroute 명령어  (0) 2014.12.10
Posted by 무세1
,