Common HTTP Status Codes

Common HTTP Status Codes

1XX (Informational Purpose)

  • These response codes are used to send some provisional message to the client while the server is still processing the request.

1) 100 - Continue

This status code indicates that the server has received request headers and the client can continue to send request body.

2) 101 - Switching Protocols

This status code is sent when the server is switching protocols as requested by the client.

3) 102 - Processing

The server is taking time to process the request and updates the client to wait until the server processes the request without timing out the request.

2XX (Success)

  • This set of status codes indicates that the request has been successfully received, understood, and accepted.

4) 200 - OK

This status code indicates that the request sent by the client is OK.

5) 201 - Created

It indicates that a new resource has been created as requested by the client.

6) 202 - Accepted

It indicates that the request has been accepted for processing but processing is not complete yet.

7) 203 - Non-Authoritative Information

It indicates that enclosing information is modified by the transforming proxy server from an original server.

8) 204 - No Content

This status code indicates that the request has been processed successfully and the response doesn’t contain any content.

3XX (Redirection)

  • This category of HTTP status codes is related to URL redirection. These status codes indicate that the client needs to take additional action to complete the request.

9) 300 - Multiple Choices

It returns with multiple choices of links that a user can select and go to that location.

10) 301 - Moved Permanently

It indicates that the requested page has been moved permanently to the given URL.

11) 302 - Found

The requested page has been moved temporarily to a new URL.

12) 303 - See Other

The requested page can be found under another URL.

13) 304 - Not Modified

It indicates that the requested page has not been modified since the specified date.

14) 305 - Use Proxy

The requested page can be accessed only through the proxy and the address of that proxy is provided in the response.

15) 306 - No Longer Used

This status code is no longer used and it is reserved for now. Previously it was used to switch proxy.

16) 307 - Temporary Redirect

The requested page has been moved temporarily to a new URL and the user has to make a fresh request using the specified URL without changing the method type.

17) 308 - Moved Permanently

The requested page has been moved permanently to a new URL and the user has to make a fresh request using the specified URL without changing the method type.

4XX (Client Errors)

This category of HTTP status codes represents errors on the client side.

18) 400 - Bad Request

It is sent when a request syntax is wrong or request size is too large or invalid construction of the request message.

19) 401 - Unauthorized

It is sent when authorization is required and the user doesn’t provide them.

20) 402 - Payment Required

It is still not in use. It is reserved for future use but some developers use it when a payment is required for the service.

21) 403 - Forbidden

It is sent when a user doesn’t have permission to access the requested page.

22) 404 - Not Found

It is sent when a requested page or resource is not found.

23) 405 - Method Not Allowed

It is sent when a request method (GET or POST) is not allowed for a requested resource or page.

24) 406 - Not Acceptable

It is sent when the server is unable to generate content that is acceptable to the client.

25) 407 - Proxy Authentication Required

It is sent when an authentication of a proxy server is required.

26) 408 - Request Time Out

It occurs when a server is timed out waiting for the request.

27) 409 - Conflict

It is sent when a request is not processed because of a conflict. It happens when a requested resource is not in the expected state or serving the request will cause conflict in the requested resource.

28) 410 - Gone

It is sent when a requested page or resource is no longer available.

29) 411 - Length Required

It is sent when a request doesn’t specify a content-length parameter and it is required by the server.

30) 412 - Precondition Failed

It occurs when a server fails to meet the preconditions specified by the requester.

31) 413 - Payload Too Large

It is sent when a server is not able to process the request because it is too large. Previously it was called Request Entity Is Too Large.

32) 414 - URI Too Long

It is sent when a requested URL is too long to process.

33) 415 - Unsupported Media Type

It is sent when a client uploads an unsupported media type.

34) 429 - Too Many Requests

It occurs when a client sends too many requests in a specified period of time.

5XX (Server Errors)

This category of error codes represents server-side errors.

35) 500 - Internal Server Error

It occurs when a server meets with an unexpected condition.

36) 501 - Not Implemented

It indicates that a server doesn’t recognize the requested method or it is unable to process that type of request.

37) 502 - Bad Gateway

It happens when a server receives an invalid response from an upstream server.

38) 503 - Service Unavailable

It indicates that the server is temporarily down for maintenance or overloaded.

39) 504 - Gateway Timeout

It occurs when a server doesn’t receive a response on time from the upstream server.

40) 505 - HTTP Version Not Supported

It indicates that the server doesn’t support the HTTP protocol version used in the request.

41) 507 - Insufficient Storage

It indicates that the server doesn’t have sufficient storage to complete this request.

42) 511 - Network Authentication Required

The client needs to authenticate to gain network access.

要查看或添加评论,请登录

SURIYA E的更多文章

  • Simple Answers to Software Testing Interview Questions

    Simple Answers to Software Testing Interview Questions

    Authentication and Authorization Authentication (Auth): Verifies the user's identity. Authorization: Determines the…

    1 条评论
  • Cookies vs Cache

    Cookies vs Cache

    Cookies and cache are both storage mechanisms used in web browsing, but they serve different purposes: Cookies: Small…

    1 条评论
  • What is a bot and how do they work

    What is a bot and how do they work

    What is a Bot? A bot is an automated software application that performs repetitive tasks over a network. It follows…

  • Comparison of HTTP Cookies, Sessions, and Tokens for Web Authentication and Authorization

    Comparison of HTTP Cookies, Sessions, and Tokens for Web Authentication and Authorization

    HTTP cookies: HTTP cookies are small pieces of data that are sent by the server to the client, and stored by the…

  • HTTP Headers

    HTTP Headers

    HTTP Request and Response objects consist of a body and header. While the body in the Response holds the data message…

  • Penetration Testing

    Penetration Testing

    What is Penetration Testing? It’s the process of identifying security vulnerabilities in an application by evaluating…

    1 条评论
  • Real-life examples of web services

    Real-life examples of web services

    1. Weather forecast web service This service provides current weather information and forecasts for a given location.

  • What is CAPTCHA? Types and Examples

    What is CAPTCHA? Types and Examples

    CAPTCHA is the Completely Automated Public Turing Test to Tell Computers and Humans Apart. You can use CAPTCHAs to…

  • Real-World Examples of Cyber Attacks and Their Impact

    Real-World Examples of Cyber Attacks and Their Impact

    1.Leak of passwords It was the largest breach since the 2009 incident on the RockYou website, which affected 32 million…

  • Microservices

    Microservices

    Microservice is a form of service-oriented architecture style, loosely coupled distributed service wherein a large…

社区洞察

其他会员也浏览了