I believe post is for creating with posted value(s). Put would be just a modification without posted value. E.g. "PUT /users/123/disabled" would disable a user.
Edit: after reading, POST is for creating with an unknown identifier (think INSERT w/ auto-generated PK) whereas PUT is for creating or updating (if already present) with a known identifier (think UPSERT w/ a manually entered PK).
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.
4 comments
[ 4.0 ms ] story [ 12.8 ms ] threadwouldn't it be PUT?
Edit: after reading, POST is for creating with an unknown identifier (think INSERT w/ auto-generated PK) whereas PUT is for creating or updating (if already present) with a known identifier (think UPSERT w/ a manually entered PK).
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.