cURL – PUTリクエストの例
cURL -X PUT
を使用してPUT(更新)要求を送信し、ユーザーの名前と電子メールを更新する例。
ターミナル
$ curl -X PUT -d '[email protected]' http://localhost:8080/user/100
REST APIがJSON形式のデータのみを受け入れる場合は、これを試してください
ターミナル
$ curl -X PUT -H "Content-Type: application/json" -d '{"name":"example","email":"[email protected]"}' http://localhost:8080/user/100