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 40 of file request.h.
Function signature for querying credentials for a given URL.
Definition at line 156 of file request.h.
ErrorHandler is invoked in case of errors arising while executing the request.
Definition at line 103 of file request.h.
ProgressHandler is invoked for progress updates while executing the request.
Definition at line 108 of file request.h.
ResponseHandler is invoked when a request completes.
Definition at line 113 of file request.h.
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 46 of file request.h.
core::net::http::Request::Request |
( |
const Request & |
| ) |
|
|
delete |
virtual core::net::http::Request::~Request |
( |
| ) |
|
|
virtualdefault |
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.
Synchronously executes the request.
- Exceptions
-
- Returns
- The response to the request.
bool core::net::http::Request::operator== |
( |
const Request & |
| ) |
const |
|
delete |
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. |
virtual State core::net::http::Request::state |
( |
| ) |
|
|
pure virtual |
state queries the current state of the operation.
- Returns
- A value from the State enumeration.
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. |
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-wObqh_/net-cpp-2.0.0/include/core/net/http/request.h