curlの使い方
概要
- curl - transfer a URL
オプション
-s
: silent mode (don’t show progress meter or error messages)-sS
: silent mode with errors (don’t show progress meter, but show errors)
JSONのデータを付加して、リクエストする
$ curl -X POST http://localhost:8080/endpoint \
-H "Content-Type: application/json" \
-d '{"key": "value", "user": "Hello, World"}'