Answer the question
In order to leave comments, you need to log in
How to make a redirect in the browser after creating a resource with HTTP code 201 Created with RESTful API?
When I receive a request POST /resources/
, I send a response.
HTTP/1.1 201 Created
Location: /resources/1
/resources/
(to which the POST request came) is not good. Answer the question
In order to leave comments, you need to log in
www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
For 201 (Created) responses, the Location is that of the new resource which was created by the request.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question