Google APIs Client Library for C++
|
Specifies per-request options that control its behavior. More...
#include "client/transport/http_types.h"
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. |
Specifies per-request options that control its behavior.
Default constructor.
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.
bool has_timeout | ( | ) | const [inline] |
Determine if request can 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.
[in] | destroy | false (default) requires explicit destruction. |
void set_max_redirects | ( | int | n | ) | [inline] |
Set maximum permissable redirects.
[in] | n | 0 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.
[in] | n | 0 will not attempt any retries. |
void set_timeout_ms | ( | int64 | ms | ) | [inline] |
Specify timeout, in milliseconds.
The precision of the timeout is left to the actual transport used.
[in] | ms | 0 indicates request will never timeout. |
int64 timeout_ms | ( | ) | const [inline] |
Get specified timeout, in milliseconds.