When interacting with a web application, the application will send a response code back to the user’s browser to indicate the status of the requested operation. These response codes provide information about the success or failure of the request and can also provide details about the specific type of error encountered. Here are some of the most common response codes that can be received from a web application:
- 200 OK: This response code indicates that the request was successful, and the requested content is being returned as expected.
- 201 Created: This response code indicates that the requested operation has been successfully created on the server, such as creating a new user account or adding a new item to a shopping cart.
- 204 No Content: This response code indicates that the request was successful, but there is no content to return.
- 301 Moved Permanently: This response code indicates that the requested resource has been permanently moved to a new URL. The browser should automatically redirect to the new URL.
- 302 Found: This response code indicates that the requested resource has been temporarily moved to a new URL. The browser should automatically redirect to the new URL.
- 400 Bad Request: This response code indicates that the server could not understand the request due to invalid syntax or missing information.
- 401 Unauthorized: This response code indicates that the user needs to authenticate to access the requested resource.
- 403 Forbidden: This response code indicates that the user is not authorized to access the requested resource.
- 404 Not Found: This response code indicates that the requested resource could not be found on the server.
- 500 Internal Server Error: This response code indicates that the server encountered an error while processing the request.