Node.js · Junior · Question 64 of 75
Which HTTP status code should an API return when a resource is created?
- ✓Correct answer:
201 Created - 2
200 OKonly - 3
204 No Content
Explanation
201 is the standard answer to a successful POST that creates something, often with a Location header. 204 means success with no body, common for DELETE.