Google APIs Client Library for C++
|
This is a helper class for interpreting standard HTTP status codes. More...
#include "client/transport/http_types.h"
Public Types | |
enum | HttpStatus { OK = 200, NO_CONTENT = 204, MULTIPLE_CHOICES = 300, MOVED_PERMANENTLY = 301, FOUND = 302, SEE_OTHER = 303, NOT_MODIFIED = 304, TEMPORARY_REDIRECT = 307, BAD_REQUEST = 400, UNAUTHORIZED = 401, FORBIDDEN = 403, NOT_FOUND = 404, NOT_ALLOWED = 405, NOT_ACCEPTABLE = 406, REQUEST_TIMEOUT = 408, SERVER_ERROR = 500, SERVICE_UNAVAILABLE = 503 } |
Symbolic names for some common HTTP Stauts Codes of interest. More... | |
Static Public Member Functions | |
static bool | IsRedirect (int http_code) |
Returns true if the given HTTP status code indicates an HTTP Redirect. | |
static bool | IsOk (int http_code) |
Returns true if the given HTTP status code indicates a successful request. | |
static bool | IsInformational (int http_code) |
Returns true if the given HTTP status code indicates an informational response. |
This is a helper class for interpreting standard HTTP status codes.
It is not meant to be instantiated.
enum HttpStatus |
Symbolic names for some common HTTP Stauts Codes of interest.
The list here is not a complete enumeration of http_code values. It only enumerates the standard codes that are of particular itnerest within this library or might be commonly checked by consumers.
See Section 10 of RFC 2616 for a complete list of standard status codes.
static bool IsInformational | ( | int | http_code | ) | [inline, static] |
Returns true if the given HTTP status code indicates an informational response.
[in] | http_code | Denotes an HTTP status code. |
static bool IsOk | ( | int | http_code | ) | [inline, static] |
Returns true if the given HTTP status code indicates a successful request.
[in] | http_code | Denotes an HTTP status code. |
static bool IsRedirect | ( | int | http_code | ) | [inline, static] |
Returns true if the given HTTP status code indicates an HTTP Redirect.
[in] | http_code | Denotes an HTTP status code |
HTTP 1.1 only defines 300-307 http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html