3 ms·
> REST says you should use HTTP status codes No, it doesn't, though leveraging the semantics of the underlying communications protocol (such as response codes
by dragonwriter 5y ago
> REST says you should use HTTP status codes
No, it doesn't, though leveraging the semantics of the underlying communications protocol (such as response codes when running over HTTP) is a convenient way to satisfying the “self-describing messages” constraint of REST.
> you can code up a resource that always returns 200 for POSTs, and that's fine as far as HTTP goes, and not as far as REST goes.
The only reason it would be even slightly problematic for REST is if it were inconsistent with the semantics of HTTP. Which, of course, returning 200 for anything but success would be.