Google APIs Client Library for C++
HttpRequestOptions Class Reference

Specifies per-request options that control its behavior. More...

#include "client/transport/http_types.h"

List of all members.

Public Member Functions

 HttpRequestOptions ()
 Default constructor.
void clear_timeout ()
 Clears the timeout value so requests can be indefnite.
bool has_timeout () const
 Determine if request can timeout.
void set_timeout_ms (int64 ms)
 Specify timeout, in milliseconds.
int64 timeout_ms () const
 Get specified timeout, in milliseconds.
void set_max_retries (int n)
 Set maximum permissable retries.
int max_reries () const
 Get specified max permissable retries.
int max_redirects () const
 Get specified maximum permissable redirects.
void set_max_redirects (int n)
 Set maximum permissable redirects.
bool destroy_when_done () const
 Determine if request will self-destruct when done.
void set_destroy_when_done (bool destroy)
 Specify whether to self-destruct when done.

Detailed Description

Specifies per-request options that control its behavior.


Constructor & Destructor Documentation

Default constructor.


Member Function Documentation

void clear_timeout ( ) [inline]

Clears the timeout value so requests can be indefnite.

bool destroy_when_done ( ) const [inline]

Determine if request will self-destruct when done.

Returns:
false Will not self destruct.
bool has_timeout ( ) const [inline]

Determine if request can timeout.

Returns:
false if request will never timeout.
int max_redirects ( ) const [inline]

Get specified maximum permissable redirects.

int max_reries ( ) const [inline]

Get specified max permissable retries.

void set_destroy_when_done ( bool  destroy) [inline]

Specify whether to self-destruct when done.

Parameters:
[in]destroyfalse (default) requires explicit destruction.
void set_max_redirects ( int  n) [inline]

Set maximum permissable redirects.

Parameters:
[in]n0 will not follow any redirets. Maximum number of redirects to follow when sending requests.
void set_max_retries ( int  n) [inline]

Set maximum permissable retries.

This is only applicable for situations in which the application chooses to attempt to retry sending a request. These do not include redirects.

Parameters:
[in]n0 will not attempt any retries.
See also:
HttpRequest
max_redirects
void set_timeout_ms ( int64  ms) [inline]

Specify timeout, in milliseconds.

The precision of the timeout is left to the actual transport used.

Parameters:
[in]ms0 indicates request will never timeout.
int64 timeout_ms ( ) const [inline]

Get specified timeout, in milliseconds.

Returns:
0 if there is no timeout.

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