status codes Flashcards

Learn the meaning of every http status code.

1
Q

What do HTTP response status codes indicate?

A

How a specific HTTP request has completed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the five HTTP status code classes?

A

1xx: Informational.
2xx: Successful.
3xx: Redirection.
4xx: Client Error.
5xx: Server Error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

100 status code?

A

Continue. Everything is OK so far and client should continue with request or ignore if it is already finished.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

101 status code?

A

Switching Protocol. Response to an Upgrade request header by the client, and indicates the protocol the server is switching to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

102 status code?

A

Processing. Indicates that the server has received and is processing the request, but no response is available yet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

103 status code?

A

Early Hints. Primarily intended to be used with the Link header to allow the user agent to start preloading resources while the server is still preparing a response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

200 status code?

A

OK. The request has succeeded. The meaning of a success varies depending on the HTTP method:
GET: The resource has been fetched and is transmitted in the message body.
HEAD: The entity headers are in the message body.
PUT or POST: The resource describing the result of the action is transmitted in the message body.
TRACE: The message body contains the request message as received by the server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

201 status code?

A

Created. Request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a POST request, or after some PUT requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

202 status code?

A

Accepted. The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

203 status code?

A

Non-Authoritative Information. Returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

204 status code?

A

No Content. There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

205 status code?

A

Reset Content. Sent after accomplishing request to tell user agent reset document view which sent this request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

206 status code?

A

Partial Content. Used because of range header sent by the client to separate download into multiple streams.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

300 status code?

A

Multiple Choice. Request has more than one possible response. The user-agent or user should choose one of them. There is no standardized way of choosing one of the responses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

301 status code?

A

Moved Permanently. Means that the URI of the requested resource has been changed permanently. Probably, the new URI would be given in the response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

302 status code?

A

Found. Means that the URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

303 status code?

A

See Other. The server sent this response to direct the client to get the requested resource at another URI with a GET request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

304 status code?

A

Not Modified. This is used for caching purposes. It tells the client that the response has not been modified, so the client can continue to use the same cached version of the response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

307 status code?

A

Temporary Redirect. The server sends this response to direct the client to get the requested resource at another URI with same method that was used in the prior request. This has the same semantics as the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: If a POST was used in the first request, a POST must be used in the second request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

308 status code?

A

Permanent Redirect. This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: If a POST was used in the first request, a POST must be used in the second request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

400 status code?

A

Bad Request. Means that server could not understand the request due to invalid syntax.

22
Q

401 status code?

A

Unauthorized. Although the HTTP standard specifies “unauthorized”, semantically this response means “unauthenticated”. That is, the client must authenticate itself to get the requested response.

23
Q

403 status code?

A

Forbidden. The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike 401, the client’s identity is known to the server.

24
Q

404 status code?

A

Not Found. The server can not find requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 to hide the existence of a resource from an unauthorized client. This response code is probably the most famous one due to its frequent occurence on the web.

25
Q

405 status code?

A

Method Not Allowed. The request method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code.

26
Q

406 status code?

A

Not Acceptable. This response is sent when the web server, after performing server-driven content negotiation, doesn’t find any content following the criteria given by the user agent.

27
Q

407 status code?

A

Proxy Authentication Required. This is similar to 401 but authentication is needed to be done by a proxy.

28
Q

408 status code?

A

Request Timeout. This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection. This response is used much more since some browsers, like Chrome, Firefox 27+, or IE9, use HTTP pre-connection mechanisms to speed up surfing. Also note that some servers merely shut down the connection without sending this message.

29
Q

409 status code?

A

Conflict. This response is sent when a request conflicts with the current state of the server.

30
Q

410 status code?

A

Gone. This response would be sent when the requested content has been permanently deleted from server, with no forwarding address. Clients are expected to remove their caches and links to the resource. The HTTP specification intends this status code to be used for “limited-time, promotional services”. APIs should not feel compelled to indicate resources that have been deleted with this status code.

31
Q

411 status code?

A

Length Required. Server rejected the request because the Content-Length header field is not defined and the server requires it.

32
Q

412 status code?

A

Precondition Failed. The client has indicated preconditions in its headers which the server does not meet.

33
Q

413 status code?

A

Payload Too Large. Request entity is larger than limits defined by server; the server might close the connection or return an Retry-After header field.

34
Q

414 status code?

A

URI Too Long. The URI requested by the client is longer than the server is willing to interpret.

35
Q

415 status code?

A

Unsupported Media Type. The media format of the requested data is not supported by the server, so the server is rejecting the request.

36
Q

416 status code?

A

Requested Range Not Satisfiable. The range specified by the Range header field in the request can’t be fulfilled; it’s possible that the range is outside the size of the target URI’s data.

37
Q

417 status code?

A

Expectation Failed. This response code means the expectation indicated by the Expect request header field can’t be met by the server.

38
Q

422 status code?

A

Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors.

39
Q

425 status code?

A

Too Early. Indicates that the server is unwilling to risk processing a request that might be replayed.

40
Q

426 status code?

A

Upgrade Required. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server sends an Upgrade header in a 426 response to indicate the required protocol(s).

41
Q

428 status code?

A

Precondition Required. The origin server requires the request to be conditional. Intended to prevent the ‘lost update’ problem, where a client GETs a resource’s state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.

42
Q

429 status code?

A

Too Many Requests. The user has sent too many requests in a given amount of time (“rate limiting”).

43
Q

431 status code?

A

Request Header Fields Too Large. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.

44
Q

451 status code?

A

Unavailable For Legal Reasons. The user requests an illegal resource, such as a web page censored by a government.

45
Q

500 status code?

A

Internal Server Error. The server has encountered a situation it doesn’t know how to handle.

46
Q

501 status code?

A

Not Implemented. The request method is not supported by the server and cannot be handled. The only methods that servers are required to support (and therefore that must not return this code) are GET and HEAD.

47
Q

502 status code?

A

Bad Gateway. This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.

48
Q

503 status code?

A

Service Unavailable. The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This responses should be used for temporary conditions and the Retry-After: HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.

49
Q

504 status code?

A

Gateway Timeout. This error response is given when the server is acting as a gateway and cannot get a response in time.

50
Q

505 status code?

A

HTTP Version Not Supported. The HTTP version used in the request is not supported by the server.

51
Q

511 status code?

A

Network Authentication Required. The 511 status code indicates that the client needs to authenticate to gain network access.