Google APIs Client Library for C++
|
The HTTP transport layer provides lower-level support for interacting with standard HTTP/1.1 web servers. More...
Classes | |
class | AuthorizationCredential |
The abstraction used to pass credentials also contains knowledge about how to use the credentials to authorize requests. More... | |
class | HttpRequest |
Denotes an HTTP request to be sent to an HTTP server. More... | |
class | HttpResponse |
Captures the response from HttpRequest invocations. More... | |
class | HttpScribeCensor |
Determines what is appropriate for scribes to record. More... | |
class | HttpScribe |
Base class for scribe to log HTTP message activity. More... | |
class | HttpEntryScribe |
A high level but still abstract class for intercepting HTTP requests. More... | |
class | HttpTransportErrorHandler |
forward declaration More... | |
class | HttpTransportOptions |
Configures options on an HttpTransport instanceEach HttpTransport instance maintains its own options however typically the default options are set on the HttpTransportFactory so that the options will apply to all transport instances. More... | |
class | HttpTransportLayerConfig |
Specifies the implementation components for the TransportLayer. More... | |
class | HttpTransport |
Abstract interface defining an HTTP transport will be specialized for different concrete mechanisms for interacting with HTTP servers. More... | |
class | HttpTransportFactory |
Abstract interface for creating concrete HttpTransport instances. More... | |
class | HttpRequestOptions |
Specifies per-request options that control its behavior. More... | |
class | HttpRequestState |
Denotes the current state of an HttpRequest's lifecycel. More... | |
class | HttpStatusCode |
This is a helper class for interpreting standard HTTP status codes. More... | |
Typedefs | |
typedef std::map< string, string, RequestHeaderLess > | HttpHeaderMap |
Collection of HTTP headers (without repeated headers). | |
typedef std::multimap< string, string, StringCaseLess > | HttpHeaderMultiMap |
Collection of HTTP headers (allows repeated header values). | |
typedef Callback1< HttpRequest * > | HttpRequestCallback |
Denotes a callback function that takes an HttpRequest* parameter. |
The HTTP transport layer provides lower-level support for interacting with standard HTTP/1.1 web servers.
In particular those that are used to host cloud-based services such as the Google Cloud Platform. Much if not all of it can be used for other HTTP servers and uses. In fact, the Google APIs Client Library for C++ uses it in the OAuth 2.0 module for messaging with OAuth 2.0 servers.
The HTTP transport layer is designed as a keystone building block to implement the Google APIs Client Library for C++. One aspect of this is that it does not explicitly dictate a particular implementation for the physical HTTP messaging. Instead it chiefly provides an abstraction for messaging and a means for "plugging in" implementation details for the physical messaging. To be useful, it provides a reasonable implementation suitable for most purposes. However some clients or situations may wish to use some other mechanism, especially pre-existing ones in their runtime environments. This is accomodated by the HttpTransport class.
In addiition to the HttpTransport class, the core HTTP transport layer also includes the HttpRequest, HttpRequestState and HttpResponse and httpTransportErrorHandler classes. It also includes an abstract AuthorizationCredential class for making authorized requests. The Google APIs Client Library for C++ builds on this abstract class to provide OAuth 2.0 support in the OAuth2 2.0 module. Together this allows the transport layer to be used to comply with OAuth 2.0 protected resources without actually depending on a specific client-side implementation of OAuth 2.0.
typedef std::map<string, string, RequestHeaderLess> HttpHeaderMap |
Collection of HTTP headers (without repeated headers).
The map is keyed by case-insensitive header naem. The values are the header values.
typedef std::multimap<string, string, StringCaseLess> HttpHeaderMultiMap |
Collection of HTTP headers (allows repeated header values).
The map is keyed by case-insensitive header naem. The values are the header values.
typedef Callback1<HttpRequest*> HttpRequestCallback |
Denotes a callback function that takes an HttpRequest* parameter.
Request callbacks are used for notification on asynchronous requests. Typically the owner maintains ownership of the request. If this is called by the ExecuteAsync flow then you can call DestroyWhenDone before executing the request and the request will be destroyed after the callback is called.