Section: IT & Technology · Web DevelopmentDifficulty: Easy

HTTP Status Codes

USUK

Standardized three-digit codes indicating the result of an HTTP request.

Also: HTTP codes · response codes

Definition

HTTP status codes are standardized three-digit numeric codes returned by servers to indicate the result of a client's HTTP request. They are grouped: 1xx (informational), 2xx (success, e.g., 200 OK, 201 Created), 3xx (redirection, e.g., 301 Moved Permanently, 302 Found), 4xx (client errors, e.g., 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found), and 5xx (server errors, e.g., 500 Internal Server Error, 503 Service Unavailable). Correct use of status codes is essential for well-designed APIs and web applications.

Example

An API returns 201 Created with the new resource's URL in the Location header when a user successfully registers; it returns 409 Conflict if the email already exists, allowing the client to display an appropriate error message.

Synonyms

  • HTTP response codes
  • status codes
  • web response codes

Images

CC-licensed · free to use
More on Wikimedia
Loading images…

Video

  • http
  • rest
  • api
  • https

Dictionary Entry

Back to IT & Technology