호출 옵션
-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 "key=value&key1=value1"
-H "Content-Type: application/x-www-form-urlencoded"
-X GET http://localhost/test
POST
QueryString
curl -d "key=value&key1=value1" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://localhost/test
JSON
curl -d '{"key":"value", "key1":"value1"}' -H "Content-Type: application/json;charset=UTF-8" -X POST http://localhost/test
'OS > Linux' 카테고리의 다른 글
Linux X Java X Tomcat (수정중) (0) | 2020.01.29 |
---|