REST Specific HTTP Status Codes

Introduction

Anyone dealing with web technology needs to understand HTTP status codes. These three-digit codes, which a server returns to a client in response to a request, include important details regarding the request's result. We'll examine the different HTTP status codes in this blog post, which are divided into categories such as informational, success, redirection, client error, and server error answers.

1.1xx Informational:

HTTP 1xx  status codes provide early warnings, indicate that the request was received, or continue the procedure.

100 Continue: The client should deliver the request body once the server has received the request headers.

101 Switching Protocols: The server has been requested to switch protocols by the requester.

102 Processing: The request is being processed by the server, but it is not yet finished.

103 Early Hints: These headers are returned before to the final HTTP message.

2.2xx Success:

HTTP 2xx status codes signify that the request from the client was successfully received, comprehended, and approved.acknowledges the successful receipt, comprehension, and acceptance of the client's request.

200 OK: For a successful transaction.

201 Created: For creating an entry in the database or updating details.

202 Accepted: It might accept the request but not decided on going to create an entry.

203 Non-Authoritative Information :  The information given by the user is not the original owner of the request.

204 No Content: The response came without no entity-body.

3.3xx Redirection:

HTTP 3xx status codes suggest that more steps must be taken to fulfill the request.

301 Moved Permanently: The requested resource has been assigned a new permanent URI.

302 Found: The requested resource resides temporarily under a different URI.

303 See Other: The response to the request can be found under a different URI and should be retrieved using a GET method on that resource.

304 Not Modified: Indicates that the resource has not been modified since the version specified by the request headers.

305 Use Proxy: Deprecated. Requests should use the specified proxy.

307 Temporary Redirect: The requested resource resides temporarily under a different URI.

308 Permanent Redirect: The request and all future requests should be repeated using another URI.

4.4xx Client Error:

HTTP 4xx status codes suggest an error appears to have been made by the client.

400 Bad Request: This response code indicates that the server detected a syntax error in the client’s request.

401 Unauthorized: The service failed because of not give proper parameters like  username, password

403 Forbidden : The request was denied for a reason the server does not want to (or has no means to) indicate to the client.

404 Not Found: The document at the specified URL does not exist.

405 Method Not Allowed:This code is given with the Allow header and indicates that the method used by the client is not supported for this URL.

406 Not Acceptable: The URL specified by the client exists, but not in a format preferred by the client. Along with this code, the server provides the Content-Language, Content-Encoding, and Content-type headers.

412 Precondition Failed : The condition specified by one or more If… headers in the request evaluated to false.

415 Unsupported Media Type: The server will not process the request because its entity-body is in 

5.5xx Server Error:

HTTP 5xx status codes indicate that the server failed to fulfill a valid request.

500 Internal Server Error: This code indicates that a part of the server encountered a configuration error.

501 Not Implemented : This code indicates that the client requested an action that cannot be performed by the server.

502 Bad Gateway: This code indicates that the server (or proxy) encountered invalid responses from another server (or proxy).

503 Service Unavailable: This code means that the service is temporarily unavailable, but should be restored in the future.
504 Gateway Time-out: This code means that the service is temporarily unavailable, but should be restored in the future.

Thanks !

Comments

Popular posts from this blog

Unified Payments Interface (UPI) : Detail Analysis

Postman Automation with Newman

Postman Test Automation with Teamcity