4 ms·
This is what I've done in APIs I designed. You end up with requests like this: POST /widgets Content-Type: application/json -- {"name": "An example wi
by asthasr 14y ago
This is what I've done in APIs I designed. You end up with requests like this:
POST /widgets
Content-Type: application/json
--
{"name": "An example widget", "color": "blue"}
With the response being:
201 CREATED
Location: /widgets/37
--
(no body)
- untothebreach 14y agoyes, I know I have read somewhere that this is "recommended" for REST apis, but I'll be damned if I can find the source.
- asthasr 14y agoThis is the pattern that's recommended in Thomas Erl's SOA with REST book. (http://www.amazon.com/dp/0137012519 http://www.amazon.com/dp/0137012519)