Sobes.tech
Junior

What types of server responses do you know?

sobes.tech AI

Answer from AI

Server responses are represented by HTTP status codes, divided into 5 classes:

  1. 1xx (Informational): Request received, continuing process.
    • 100 Continue
    • 101 Switching Protocols
    • 102 Processing
    • 103 Early Hints
  2. 2xx (Successful): Request successfully received, understood, and processed.
    • 200 OK
    • 201 Created
    • 202 Accepted
    • 203 Non-Authoritative Information
    • 204 No Content
    • 205 Reset Content
    • 206 Partial Content
  3. 3xx (Redirection): Additional actions are required to complete the request.
    • 300 Multiple Choices
    • 301 Moved Permanently
    • 302 Found (previously "Moved temporarily")
    • 303 See Other
    • 304 Not Modified
    • 307 Temporary Redirect
    • 308 Permanent Redirect
  4. 4xx (Client errors): The request contains invalid syntax or cannot be fulfilled.
    • 400 Bad Request
    • 401 Unauthorized
    • 403 Forbidden
    • 404 Not Found
    • 405 Method Not Allowed
    • 408 Request Timeout
    • 409 Conflict
    • 415 Unsupported Media Type
    • 429 Too Many Requests
  5. 5xx (Server errors): The server failed to properly process a valid request.
    • 500 Internal Server Error
    • 501 Not Implemented
    • 502 Bad Gateway
    • 503 Service Unavailable
    • 504 Gateway Timeout

Besides the status, the server response includes headers and a body, if applicable. Headers provide meta-information (content type, size, caching, etc.), and the body contains the data itself (HTML page, JSON, XML, etc.).