|
|
|
|
|
by paulddraper
3627 days ago
|
|
The advantage is that there is some level of standardization. 404? That means the entity doesn't exist. 302? I should look somewhere else. 401? The server doesn't know who I am. Accept? I can specify the format. ETag? I can get a faster response if I include the token in the next request. This stuff is really, really common, and people can learn your API very quickly. A transparent caching server can improve performance. Sure, with a custom protocol you can get a tight system. Hell, write your own transport layer for even more control. But it will take longer to learn and harder to interoperate. |
|
If your app is simple enough that all errors map 1:1 to HTTP, great. Or if it doesn't need that level of error management. Otherwise HTTP just confuses the issue.