The Request class encapsulates a request for a web resource.
More...
#include <request.h>
The Request class encapsulates a request for a web resource.
Definition at line 41 of file request.h.
§ AuthenicationHandler
Function signature for querying credentials for a given URL.
Definition at line 157 of file request.h.
§ ErrorHandler
ErrorHandler is invoked in case of errors arising while executing the request.
Definition at line 104 of file request.h.
§ ProgressHandler
ProgressHandler is invoked for progress updates while executing the request.
Definition at line 109 of file request.h.
§ ResponseHandler
ResponseHandler is invoked when a request completes.
Definition at line 114 of file request.h.
§ State
The State enum describes the different states a request can be in.
Enumerator |
---|
ready | The request is idle and needs execution.
|
active | The request is active and is actively being executed.
|
done | Execution of the request has finished.
|
Definition at line 47 of file request.h.
§ Request()
core::net::http::Request::Request |
( |
const Request & |
| ) |
|
|
delete |
§ ~Request()
virtual core::net::http::Request::~Request |
( |
| ) |
|
|
virtualdefault |
§ async_execute()
virtual void core::net::http::Request::async_execute |
( |
const Handler & |
handler | ) |
|
|
pure virtual |
Asynchronously executes the request, reporting errors, progress and completion to the given handlers.
- Parameters
-
handler | The handlers to called for events happening during execution of the request. |
- Returns
- The response to the request.
§ execute()
Synchronously executes the request.
- Exceptions
-
- Returns
- The response to the request.
§ operator=()
§ operator==()
bool core::net::http::Request::operator== |
( |
const Request & |
| ) |
const |
|
delete |
§ set_timeout()
virtual void core::net::http::Request::set_timeout |
( |
const std::chrono::milliseconds & |
timeout | ) |
|
|
pure virtual |
Adjusts the timeout of a State::ready request.
- Parameters
-
timeout | The timeout in milliseconds. |
§ state()
virtual State core::net::http::Request::state |
( |
| ) |
|
|
pure virtual |
state queries the current state of the operation.
- Returns
- A value from the State enumeration.
§ url_escape()
virtual std::string core::net::http::Request::url_escape |
( |
const std::string & |
s | ) |
|
|
pure virtual |
Returns the input string in URL-escaped format.
- Parameters
-
s | The string to be URL escaped. |
§ url_unescape()
virtual std::string core::net::http::Request::url_unescape |
( |
const std::string & |
s | ) |
|
|
pure virtual |
Returns the input string in URL-unescaped format.
- Parameters
-
s | The string to be URL unescaped. |
The documentation for this class was generated from the following file:
- /build/net-cpp-PqjjHz/net-cpp-2.2.0+17.04.20161108.2/include/core/net/http/request.h