3 ms·
You could set it up to either accept clients to POST a user to the /users collection, or PUT a user at /users/123. With unknown IDs the latter isn't really viab
by tobiassjosten 14y ago
You could set it up to either accept clients to POST a user to the /users collection, or PUT a user at /users/123. With unknown IDs the latter isn't really viable.
This is primarily a matter of idempotence. Several POSTs to /users would create many identical users whereas multiple PUTs to /users/123 would have exactly the same result as just one request. The PUT is idempotent.