3 ms·
ah but the "The PUT method replaces all current representations of the target resource with the request payload." means you can't pass in just 1 field like: cu
by andrewfromx 4y ago
ah but the "The PUT method replaces all current representations of the target resource with the request payload." means you can't pass in just 1 field like:
curl -XPUT -H "Authorization: Bearer token" \
-H "Content-Type: json" \
http://localhost:8080/thing -d '{"state": "some_string"}'
instead of just "state" and some_string in example above for a PUT you'd have 10 other fields right? But a PATCH, a PATCH could have just that one field.
i.e. "PATCH method applies partial modifications"
- icedchai 4y agoIf you implement your PUT flexibly, there's no reason to have PATCH.