web services - In Rest, what does "Treats the addressed member as a collection in its own right and creates a new subordinate of it." mean? -


i reading answer, , says this:

when dealing member uri like: http://example.com/resources/7hou57y

...

  • post: treats addressed member collection in own right , creates new subordinate of it.

...

i've googled , found lots of results this exact quote, none of them explain means. can elaborate , use examples?

bogdan's answer correct on answer refer means, answer little misleading, because rest not crud http. post not synonym create.

the semantics of post method action isn't standardized http protocol. post method submits payload processed targeted resource itself, not server. in way, can get, put, patch , delete methods, resource isn't aware of what's happening itself, server whole job, post, server has ask resource something.

this means action using post method must documented in way. clients can assume get, put, patch , delete request follow rfc 7231, final result of post depend on target media type.

so, if documentation media-type of resource @ http://example.com/resources/7hou57y says post create subordinate resource , return uri, fine, that's should do. if documentation says post launch nuclear missiles against targets in russia, that's should do. if there's no documentation, made mistake.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -