Typically, the Rails community typically responds to successful requests POST, PUTor DELETEby redirecting instead of returning. For example, if I am PUTa legal change in my user profile, then the idiomatic response will be 302 Redirecton the profile page.
Is that not so? Shouldn't we return 200 OKfrom the request? Or a 201 Created, in case of a request POST? Any of these, in the HTTP / 1.1 Status Definition , is allowed (or should) include a response, in any case.
I think I’m wondering, before I go and “fix” my application, is there a damn good reason why the community switched to redirecting instead of successful answers.
source
share