|
|
|
|
|
by blasdel
5932 days ago
|
|
The API should take as input the same structure it gives in responses. Ideally you would get different kinds of responses for the same resource by using the Accept header, so that browsers get text/html but your app gets application/xml or whatever you asked for. Unfortunately everyone seems to be following Rails' lead of just appending extensions onto the end of URLs — if you're lucky they'll use HATEOAS, but they usually just expect you to concatenate strings on your end using foreknowledge. |
|