|
CeresEngine 0.2.0
A game development framework
|
A URL load request that is independent of protocol or URL scheme. More...
#include <CeresEngine/Foundation/IO/URLSession.hpp>
Classes | |
| struct | CachePolicy |
An enumeration that describes how the URLProtocol implementation should handle caching of this request. More... | |
Public Types | |
| using | Mode = URLRequestMode |
| Determines the mode the request should be performed. | |
Public Member Functions | |
| IURLRequest (const URL &url, const CachePolicy cachePolicy=CachePolicy::Default) | |
Creates a new URLRequest instance. | |
| IURLRequest (const IURLRequest &request, const URL &url) | |
Creates a new IURLRequest object by copying from another but with a rewritten URL. | |
| virtual | ~IURLRequest () noexcept=default |
Destroys the URLRequest. | |
Public Attributes | |
| const URL | url |
| The URL of the request. | |
| URLRequestModeFlags | mode = URLRequestMode::Read |
| Determines the mode the request should be performed. | |
| CachePolicy | cachePolicy = CachePolicy::Default |
| The request's cache policy. | |
A URL load request that is independent of protocol or URL scheme.
URLRequest encapsulates two essential properties of a load request: the URL to load and the policies used to load it. In addition, for HTTP and HTTPS requests, URLRequest includes the HTTP method (GET, POST, and so on) and the HTTP headers.
URLRequest only represents information about the request. Use other classes, such as URLSession, to send the request to a server.
Determines the mode the request should be performed.
|
inlineexplicit |
Creates a new URLRequest instance.
| url | The URL of the request. |
| cachePolicy | A policy that determines how the protocol must handle caching. |
|
inlineexplicit |
Creates a new IURLRequest object by copying from another but with a rewritten URL.
|
virtualdefaultnoexcept |
Destroys the URLRequest.
| CachePolicy CeresEngine::IURLRequest::cachePolicy = CachePolicy::Default |
The request's cache policy.
| URLRequestModeFlags CeresEngine::IURLRequest::mode = URLRequestMode::Read |
Determines the mode the request should be performed.
By defualt, all requests are in read-only mode, but some protocols may support writing. To request writing support, the Write flag must be set.