What does the HTTP status code 404 indicate when received in a response?
Think about what happens when you try to visit a webpage that does not exist.
The 404 status code means the server could not find the requested resource. It is a common response when a URL is incorrect or the resource has been removed.
In Postman, you send a POST request to create a new user. The server responds with status code 201. What does this status code mean?
201 is a success code related to resource creation.
Status code 201 means the request was successful and a new resource was created on the server.
Which Postman test script correctly asserts that the response status code is 200?
pm.test('Status code is 200', function () { pm.response.to.have.status(200); });
Look for the correct Postman assertion syntax for status codes.
The correct way to assert status code 200 in Postman is using pm.response.to.have.status(200);. Other options are invalid methods.
You receive a 500 status code in Postman after sending a GET request. What is the most likely cause?
500 errors are server-side problems.
A 500 Internal Server Error means the server encountered an unexpected condition that prevented it from fulfilling the request.
In a REST API tested with Postman, which HTTP status code should be returned when a user tries to access a resource without valid authentication?
Consider the difference between authentication and authorization errors.
401 Unauthorized means the user is not authenticated. 403 Forbidden means authenticated but not allowed. 404 means resource missing. 400 means bad request syntax.