ruby on rails - Best practice for respond_with? -
i wondering best way handle http errors within respond_with method in rails:
respond_to :html, :json # @my_resources = [] def index respond_with @my_resources end
this action responding http 200 status code. http 204 "no content" response http request, , seems fit better correct answer original request of client (with json format). same behaviour happens other request , responses.
linking w3's raccomendation 204 response code
Comments
Post a Comment