|
CeresEngine 0.2.0
A game development framework
|
An object that manages the task for a URL request. More...
#include <CeresEngine/Foundation/IO/URLSession.hpp>
Public Types | |
| using | URLGetter = StringView(URL::*)() const |
Public Member Functions | |
| Task (URLSession &session, URLProtocol &protocol, URLRequest &&request) | |
| Creates a new connection. | |
| ~Task () noexcept=default | |
Destroys the URLProtocol Connection. | |
| URL | parseURL (const StringView url) const noexcept |
| Parses a URL and automatically detects if the element uses nested URLs. | |
| URL | parseURL (const URLGetter &getter) const noexcept |
| Async< URLResponse > | subRequest (URLRequest baseRequest) |
| Executes a sub-request. | |
| Async< URLResponse > | subRequest (URL url) |
| Executes a sub-request. | |
| Async< URLResponse > | subRequest (const URLGetter &getter) |
| Executes a sub-request. | |
| template<typename T > | |
| const T & | as () const |
| Gets the request as a concrete type. | |
Public Attributes | |
| URLSession & | session |
A reference to the URLSession that is executing the task. | |
| URLProtocol & | protocol |
A reference to the URLProtocol that is executing the request. | |
| const URLRequest | request |
A copy of the request object, already transformed by the executing protocol. | |
An object that manages the task for a URL request.
| using CeresEngine::URLProtocol::Task::URLGetter = StringView (URL::*)() const |
|
inlineexplicit |
Creates a new connection.
| session | A reference to the URLSession that opened the connection. |
| protocol | A reference to the URLProtocol that is executing the request. |
| request | The request object. |
|
defaultnoexcept |
Destroys the URLProtocol Connection.
Gets the request as a concrete type.
| T | The request type. |
T.
|
noexcept |
Parses a URL and automatically detects if the element uses nested URLs.
| url | The string to be parsed as a URL. |
|
inline |
Executes a sub-request.
| baseRequest | The sub-request to be executed. |
|
inline |
Executes a sub-request.
| baseRequest | The sub-request to be executed. |
| Async< URLResponse > CeresEngine::URLProtocol::Task::subRequest | ( | URLRequest | baseRequest | ) |
Executes a sub-request.
| baseRequest | The sub-request to be executed. |
| URLProtocol& CeresEngine::URLProtocol::Task::protocol |
A reference to the URLProtocol that is executing the request.
| const URLRequest CeresEngine::URLProtocol::Task::request |
A copy of the request object, already transformed by the executing protocol.
| URLSession& CeresEngine::URLProtocol::Task::session |
A reference to the URLSession that is executing the task.