What does HTTP status code 201 indicate?

Study for the MuleSoft Associate / Development Fundamental Test. Master key concepts with flashcards and multiple choice questions, complete with hints and explanations. Prepare thoroughly for your exam!

Multiple Choice

What does HTTP status code 201 indicate?

Explanation:
HTTP status codes describe the outcome of a request. A 201 Created means that a new resource was successfully created as a result of the request. This is the standard response after a POST that creates something new, and it often includes a Location header with the URL of the newly created resource (and may include the resource representation in the response body). It’s different from 200 OK, which simply indicates success without guaranteeing a new resource was created, and from 202 Accepted, which means the request was accepted but the server hasn’t finished creating the resource yet. The other options map to different scenarios: Not Modified (304) relates to caching and conditional requests; Bad Request (400) means the request was malformed; Unauthorized (401) indicates authentication is required.

HTTP status codes describe the outcome of a request. A 201 Created means that a new resource was successfully created as a result of the request. This is the standard response after a POST that creates something new, and it often includes a Location header with the URL of the newly created resource (and may include the resource representation in the response body).

It’s different from 200 OK, which simply indicates success without guaranteeing a new resource was created, and from 202 Accepted, which means the request was accepted but the server hasn’t finished creating the resource yet.

The other options map to different scenarios: Not Modified (304) relates to caching and conditional requests; Bad Request (400) means the request was malformed; Unauthorized (401) indicates authentication is required.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy