Google APIs Client Library for C++
CurlHttpTransport Class Reference

A concrete HttpTransport that is implemented using the open source CURL library. More...

#include "client/transport/curl_http_transport.h"

+ Inheritance diagram for CurlHttpTransport:

List of all members.

Public Member Functions

 CurlHttpTransport (const HttpTransportOptions &options)
 Overrides default options while constructing.
virtual ~CurlHttpTransport ()
 Standard destructor.
virtual HttpRequestNewHttpRequest (const HttpRequest::HttpMethod &method)
 Creates new HttpRequest that will be executed using the transport.

Static Public Attributes

static const StringPiece kTransportIdentifier
 The default id() attribute value identifying curl transport instances.

Detailed Description

A concrete HttpTransport that is implemented using the open source CURL library.

A curl transport is capable of having multiple requests running and talking to multiple servers. For future optimization purposes, it is suggested that you use a single CurlHttpTransport instances for all requests sent to the same service, but use different instances to talk to different services. This is not required but might have better performance as the implementation is tuned and optimized.

It is recommended to not use this class directly, especially in library code. Use the generic HttpTransport and HttpTransportFactory unless you specifically want to use curl for some reason.

The Google APIs for C++ Client Library is designed to accomodate external transport implementations and eliminating a dependency on curl entirely. If you use this class directly then you will be interfering with that property.

See also:
HttpTransport::set_default_transport_factory

Constructor & Destructor Documentation

CurlHttpTransport ( const HttpTransportOptions options) [explicit]

Overrides default options while constructing.

Parameters:
[in]optionsThe options to use when configuring the transport are copied into the instance.
virtual ~CurlHttpTransport ( ) [virtual]

Standard destructor.


Member Function Documentation

virtual HttpRequest* NewHttpRequest ( const HttpRequest::HttpMethod method) [virtual]

Creates new HttpRequest that will be executed using the transport.

Parameters:
[in]methodThe HTTP request method to use when constructing the request.
Returns:
Passes ownerhip of the request back to the caller. The request needs this transport instance so the caller must guarantee that this transport is not destroyed before it finishes using the request.

Implements HttpTransport.


Member Data Documentation

const StringPiece kTransportIdentifier [static]

The default id() attribute value identifying curl transport instances.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines