friendev EtherDune TCP/IP library
Variables
HTTP response codes

Variables

static const uint16_t HTTP_RESPONSE_CONTINUE = 100
 This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished. More...
 
static const uint16_t HTTP_RESPONSE_SWITCHING_PROTOCOL = 101
 This code is sent in response to an Upgrade: request header by the client, and indicates that the protocol the server is switching too. More...
 
static const uint16_t HTTP_RESPONSE_OK = 200
 The request has succeeded. More...
 
static const uint16_t HTTP_RESPONSE_CREATED = 201
 The request has succeeded and a new resource has been created as a result of it. More...
 
static const uint16_t HTTP_RESPONSE_ACCEPTED = 202
 The request has been received but not yet acted upon. More...
 
static const uint16_t HTTP_RESPONSE_NON_AUTHORITATIVE_INFORMATION = 203
 This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. More...
 
static const uint16_t HTTP_RESPONSE_NO_CONTENT = 204
 There is no content to send for this request, but the headers may be useful. More...
 
static const uint16_t HTTP_RESPONSE_RESET_CONTENT = 205
 This response code is sent after accomplishing request to tell user agent reset document view which sent this request. More...
 
static const uint16_t HTTP_RESPONSE_PARTIAL_CONTENT = 206
 This response code is used because of range header sent by the client to separate download into multiple streams. More...
 
static const uint16_t HTTP_RESPONSE_MULTIPLE_CHOICE = 300
 The request has more than one possible responses. More...
 
static const uint16_t HTTP_RESPONSE_MOVED_PERMANENTLY = 301
 This response code means that URI of requested resource has been changed. More...
 
static const uint16_t HTTP_RESPONSE_FOUND = 302
 This response code means that URI of requested resource has been changed temporarily. More...
 
static const uint16_t HTTP_RESPONSE_SEE_OTHER = 303
 Server sent this response to directing client to get requested resource to another URI with an GET request. More...
 
static const uint16_t HTTP_RESPONSE_NOT_MODIFIED = 304
 This is used for caching purposes. More...
 
static const uint16_t HTTP_RESPONSE_USE_PROXY = 305
 This means requested response must be accessed by a proxy. More...
 
static const uint16_t HTTP_RESPONSE_UNUSED = 306
 This response code is no longer used, it is just reserved currently. More...
 
static const uint16_t HTTP_RESPONSE_TEMPORARY_REDIRECT = 307
 Server sent this response to directing client to get requested resource to another URI with same method that used prior request. More...
 
static const uint16_t HTTP_RESPONSE_PERMANENT_REDIRECT = 308
 This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. More...
 
static const uint16_t HTTP_RESPONSE_BAD_REQUEST = 400
 This response means that server could not understand the request due to invalid syntax. More...
 
static const uint16_t HTTP_RESPONSE_UNAUTHORIZED = 401
 Authentication is needed to get requested response. More...
 
static const uint16_t HTTP_RESPONSE_PAYMENT_REQUIRED = 402
 This response code is reserved for future use. More...
 
static const uint16_t HTTP_RESPONSE_FORBIDDEN = 403
 Client does not have access rights to the content so server is rejecting to give proper response. More...
 
static const uint16_t HTTP_RESPONSE_NOT_FOUND = 404
 Server can not find requested resource. More...
 
static const uint16_t HTTP_RESPONSE_METHOD_NOT_ALLOWED = 405
 The request method is known by the server but has been disabled and cannot be used. More...
 
static const uint16_t HTTP_RESPONSE_NOT_ACCEPTABLE = 406
 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. More...
 
static const uint16_t HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED = 407
 This is similar to 401 but authentication is needed to be done by a proxy. More...
 
static const uint16_t HTTP_RESPONSE_REQUEST_TIMEOUT = 408
 This response is sent on an idle connection by some servers, even without any previous request by the client. More...
 
static const uint16_t HTTP_RESPONSE_CONFLICT = 409
 This response would be sent when a request conflict with current state of server. More...
 
static const uint16_t HTTP_RESPONSE_GONE = 410
 This response would be sent when requested content has been deleted from server. More...
 
static const uint16_t HTTP_RESPONSE_LENGTH_REQUIRED = 411
 Server rejected the request because the Content-Length header field is not defined and the server requires it. More...
 
static const uint16_t HTTP_RESPONSE_PRECONDITION_FAILED = 412
 The client has indicated preconditions in its headers which the server does not meet. More...
 
static const uint16_t HTTP_RESPONSE_REQUEST_ENTITY_TOO_LARGE = 413
 Request entity is larger than limits defined by server; the server might close the connection or return an Retry-After header field. More...
 
static const uint16_t HTTP_RESPONSE_REQUEST_URI_TOO_LONG = 414
 The URI requested by the client is too long for the server to handle. More...
 
static const uint16_t HTTP_RESPONSE_UNSUPPORTED_MEDIA_TYPE = 415
 The media format of the requested data is not supported by the server, so the server is rejecting the request. More...
 
static const uint16_t HTTP_RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE = 416
 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. More...
 
static const uint16_t HTTP_RESPONSE_EXPECTATION_FAILED = 417
 This response code means the expectation indicated by the Expect request header field can't be met by the server. More...
 
static const uint16_t HTTP_RESPONSE_INTERNAL_SERVER_ERROR = 500
 The server has encountered a situation it doesn't know how to handle. More...
 
static const uint16_t HTTP_RESPONSE_NOT_IMPLEMENTED = 501
 The request method is not supported by the server and cannot be handled. More...
 
static const uint16_t HTTP_RESPONSE_BAD_GATEWAY = 502
 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. More...
 
static const uint16_t HTTP_RESPONSE_SERVICE_UNAVAILABLE = 503
 The server is not ready to handle the request. More...
 
static const uint16_t HTTP_RESPONSE_GATEWAY_TIMEOUT = 504
 This error response is given when the server is acting as a gateway and cannot get a response in time. More...
 
static const uint16_t HTTP_RESPONSE_HTTP_VERSION_NOT_SUPPORTED = 505
 The HTTP version used in the request is not supported by the server. More...
 

Detailed Description

List of HTTP response codes

Variable Documentation

const uint16_t HTTP_RESPONSE_ACCEPTED = 202
static

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.

Definition at line 79 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_BAD_GATEWAY = 502
static

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.

Definition at line 113 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_BAD_REQUEST = 400
static

This response means that server could not understand the request due to invalid syntax.

Definition at line 93 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_CONFLICT = 409
static

This response would be sent when a request conflict with current state of server.

Definition at line 102 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_CONTINUE = 100
static

This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished.

Definition at line 75 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_CREATED = 201
static

The request has succeeded and a new resource has been created as a result of it.

This is typically the response sent after a PUT request.

Definition at line 78 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_EXPECTATION_FAILED = 417
static

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

Definition at line 110 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_FORBIDDEN = 403
static

Client does not have access rights to the content so server is rejecting to give proper response.

Definition at line 96 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_FOUND = 302
static

This response code means that 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.

Definition at line 86 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_GATEWAY_TIMEOUT = 504
static

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

Definition at line 115 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_GONE = 410
static

This response would be sent when requested content has been deleted from server.

Definition at line 103 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_HTTP_VERSION_NOT_SUPPORTED = 505
static

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

Definition at line 116 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_INTERNAL_SERVER_ERROR = 500
static

The server has encountered a situation it doesn't know how to handle.

Definition at line 111 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_LENGTH_REQUIRED = 411
static

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

Definition at line 104 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_METHOD_NOT_ALLOWED = 405
static

The request method is known by the server but has been disabled and cannot be used.

The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code.

Definition at line 98 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_MOVED_PERMANENTLY = 301
static

This response code means that URI of requested resource has been changed.

Probably, new URI would be given in the response.

Definition at line 85 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_MULTIPLE_CHOICE = 300
static

The request has more than one possible responses.

User-agent or user should choose one of them. There is no standardized way to choose one of the responses.

Definition at line 84 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_NO_CONTENT = 204
static

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.

Definition at line 81 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_NON_AUTHORITATIVE_INFORMATION = 203
static

This response code means 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.

Definition at line 80 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_NOT_ACCEPTABLE = 406
static

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.

Definition at line 99 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_NOT_FOUND = 404
static

Server can not find requested resource.

This response code probably is most famous one due to its frequency to occur in web.

Definition at line 97 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_NOT_IMPLEMENTED = 501
static

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.

Definition at line 112 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_NOT_MODIFIED = 304
static

This is used for caching purposes.

It is telling to client that response has not been modified. So, client can continue to use same cached version of response.

Definition at line 88 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_OK = 200
static

The request has succeeded.

The meaning of a success varies depending on the HTTP method .

Definition at line 77 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_PARTIAL_CONTENT = 206
static

This response code is used because of range header sent by the client to separate download into multiple streams.

Definition at line 83 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_PAYMENT_REQUIRED = 402
static

This response code is reserved for future use.

Initial aim for creating this code was using it for digital payment systems however this is not used currently.

Definition at line 95 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_PERMANENT_REDIRECT = 308
static

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.

Definition at line 92 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_PRECONDITION_FAILED = 412
static

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

Definition at line 105 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED = 407
static

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

Definition at line 100 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_REQUEST_ENTITY_TOO_LARGE = 413
static

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

Definition at line 106 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_REQUEST_TIMEOUT = 408
static

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 or IE9, use HTTP preconnection mechanisms to speed up surfing (see bug 634278, which tracks the future implementation of such a mechanism in Firefox). Also note that some servers merely shut down the connection without sending this message.

Definition at line 101 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_REQUEST_URI_TOO_LONG = 414
static

The URI requested by the client is too long for the server to handle.

Definition at line 107 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE = 416
static

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.

Definition at line 109 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_RESET_CONTENT = 205
static

This response code is sent after accomplishing request to tell user agent reset document view which sent this request.

Definition at line 82 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_SEE_OTHER = 303
static

Server sent this response to directing client to get requested resource to another URI with an GET request.

Definition at line 87 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_SERVICE_UNAVAILABLE = 503
static

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 theRetry-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.

Definition at line 114 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_SWITCHING_PROTOCOL = 101
static

This code is sent in response to an Upgrade: request header by the client, and indicates that the protocol the server is switching too.

It was introduced to allow migration to an incompatible protocol version, and is not in common use.

Definition at line 76 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_TEMPORARY_REDIRECT = 307
static

Server sent this response to directing client to get requested resource to another URI with same method that used prior request.

This has the same semantic than the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POSTwas used in the first request, a POST must be used in the second request.

Definition at line 91 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_UNAUTHORIZED = 401
static

Authentication is needed to get requested response.

This is similar to 403, but in this case, authentication is possible.

Definition at line 94 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_UNSUPPORTED_MEDIA_TYPE = 415
static

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

Definition at line 108 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_UNUSED = 306
static

This response code is no longer used, it is just reserved currently.

It was used in a previous version of the HTTP 1.1 specification.

Definition at line 90 of file HTTPConstants.h.

const uint16_t HTTP_RESPONSE_USE_PROXY = 305
static

This means requested response must be accessed by a proxy.

This response code is not largely supported because security reasons.

Definition at line 89 of file HTTPConstants.h.