The StreamingRequest class encapsulates a request for a web resource, streaming data to the receiver as it receives in addition to accumulating all incoming data.
More...
#include <streaming_request.h>
|
| virtual Response | execute (const ProgressHandler &ph, const DataHandler &dh)=0 |
| virtual void | async_execute (const Handler &handler, const DataHandler &dh)=0 |
| virtual void | pause ()=0 |
| | Pause the request with options for aborting the request. The request will be aborted if transfer speed falls below limit in [bytes/second] for time seconds.
|
| virtual void | resume ()=0 |
| | Resume the request.
|
| virtual void | abort_request_if (std::uint64_t limit, const std::chrono::seconds &time)=0 |
| | Sets options for aborting the request. The request will be aborted if transfer speed belows limit bytes per second for time seconds.
|
| virtual Response | execute (const ProgressHandler &ph)=0 |
| | Synchronously executes the request.
|
| virtual void | async_execute (const Handler &handler)=0 |
| | Asynchronously executes the request, reporting errors, progress and completion to the given handlers.
|
| | Request (const Request &)=delete |
| virtual | ~Request ()=default |
| Request & | operator= (const Request &)=delete |
| bool | operator== (const Request &) const =delete |
| virtual State | state ()=0 |
| | state queries the current state of the operation.
|
| virtual void | set_timeout (const std::chrono::milliseconds &timeout)=0 |
| | Adjusts the timeout of a State::ready request.
|
| virtual std::string | url_escape (const std::string &s)=0 |
| | Returns the input string in URL-escaped format.
|
| virtual std::string | url_unescape (const std::string &s)=0 |
| | Returns the input string in URL-unescaped format.
|
The StreamingRequest class encapsulates a request for a web resource, streaming data to the receiver as it receives in addition to accumulating all incoming data.
Definition at line 34 of file streaming_request.h.
◆ DataHandler
◆ abort_request_if()
| virtual void core::net::http::StreamingRequest::abort_request_if |
( |
std::uint64_t | limit, |
|
|
const std::chrono::seconds & | time ) |
|
pure virtual |
Sets options for aborting the request. The request will be aborted if transfer speed belows limit bytes per second for time seconds.
- Parameters
-
| limit | The transfer speed in seconds. |
| time | waiting period(seconds) to abort the request. |
◆ async_execute() [1/2]
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. |
| dh | The data handler receiving chunks of data while executing the request. |
- Returns
- The response to the request.
Implements core::net::http::Request.
◆ async_execute() [2/2]
| virtual void core::net::http::StreamingRequest::async_execute |
( |
const Handler & | handler, |
|
|
const DataHandler & | dh ) |
|
pure virtual |
◆ execute() [1/2]
◆ execute() [2/2]
◆ pause()
| virtual void core::net::http::StreamingRequest::pause |
( |
| ) |
|
|
pure virtual |
Pause the request with options for aborting the request. The request will be aborted if transfer speed falls below limit in [bytes/second] for time seconds.
- Exceptions
-
◆ resume()
| virtual void core::net::http::StreamingRequest::resume |
( |
| ) |
|
|
pure virtual |
Resume the request.
- Exceptions
-
The documentation for this class was generated from the following file: