POST http://example.org/customer HTTP message body contains a representation of "anne" server creates a subordinate resource called http://example.org/customer/anne GET http://example.org/customer/anne returns a representation of "anne" GET http://example.org/customer/personByName?name=anne returns a representation of "anne" or perhaps returns the URI of the "anne" resource or perhaps returns a list of URIs of all people named "anne" might also be specified more simply as GET http://example.org/customer?name=anne GET http://example.org/customer/personByAge?age=27 returns a list of URIs of people whose age is 27 or perhaps returns a collection of representations of all people aged 27 might also be specified more simply as GET http://example.org/customer?age=27 PUT http://example.org/customer/anne HTTP message body contains a representation of "anne" either creates a new resource called "anne" (if none exists) or replaces the existing "anne" resource PUT http://example.org/company/newco HTTP message body contains a representation of "newco" either creates a new resource called "newco" (if none exists) or replaces the existing "newco" resource If you prefer the server to assign the URI you would instead say POST http://example.org/company HTTP message body contains a representation of "newco" server creates a subordinate resource called http://example.org/company/newco POST http://example.org/customer/anne?addCompany=http://example.org/company/newco this would append the newco company reference to the "anne" resource
Subscribe to RSS headline updates from: