curl

sudo apt-get install curl
​
-d, --data: <data> Send specified data in POST request. 
-H, --header: <header> Headers to supply with request. 
-X, --request: The request method to use. ex) GET, POST

[GET]
curl -d "key1=value1&key2=value2" \
-H "Content-Type: application/x-www-form-urlencoded" \
-X GET http://localhost:8000/data
​
[POST]
​
[URL]
curl -d "key1=value1&key2=value2" \
-H "Content-Type: application/x-www-form-urlencoded" \
-X POST http://localhost:8000/data

[JSON]
curl -d '{"key1":"value1", "key2":"value2"}' \
-H "Content-Type: application/json" \
-X POST http://localhost:8000/data

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다