The 201 (Created) status code indicates that the request has been fulfilled and has resulted in one or more new resources being created. The primary resource created by the request is identified by either a
Location
header field in the response or, if noLocation
field is received, by the effective request URI.The 201 response payload typically describes and links to the resource(s) created.
The 201
is often used after a POST
request to create a resource. If the Location
header is used, the browser will redirect to the url provided.