struct EE::UI::WebResourceRequest¶
Overview¶
Complete input required to identify and fetch one web resource variant. More…
#include <webresourcecache.hpp> struct WebResourceRequest { // typedefs typedef std::function<void(std::function<void()>)> CompletionDispatcher; // fields Network::URI uri; WebResourceKind kind { WebResourceKind::Document }; Network::Http::Request::Method method { Network::Http::Request::Method::Get }; Network::Http::Request::FieldTable headers; std::string body; System::Time timeout { System::Seconds(5) }; bool validateCertificate { true }; Network::URI proxy; bool followRedirect { true }; bool clampToEdge { true }; bool mipmaps { false }; bool compressTexture { false }; Float svgScale { 1.f }; CompletionDispatcher completionDispatcher; };
Detailed Documentation¶
Complete input required to identify and fetch one web resource variant.
Cache identity includes the partition, canonical URI, resource kind, method, non-navigation headers, body, and image decode options. Cookie and Referer are deliberately excluded from entry identity: the partition isolates cookie contexts, while these two values naturally change during navigation. They are still sent with the HTTP request.
Transport policy such as timeout, proxy, and completionDispatcher controls a fetch but does not describe the resulting resource and is therefore not part of cache identity.
Typedefs¶
typedef std::function<void(std::function<void()>)> CompletionDispatcher
Dispatches a completion function to the thread on which it is safe to finalize a resource.
Fields¶
Network::URI uri
Absolute URI to fetch. Fragments are removed and the URI is normalized for cache lookup.
WebResourceKind kind { WebResourceKind::Document }
Semantic resource type.
Network::Http::Request::Method method { Network::Http::Request::Method::Get }
HTTP method. The method is part of cache identity.
Network::Http::Request::FieldTable headers
HTTP request headers. See the type documentation for cache-key rules.
std::string body
HTTP request body. The complete body is part of cache identity.
System::Time timeout { System::Seconds(5) }
Maximum duration allowed for the HTTP request.
bool validateCertificate { true }
Whether HTTPS certificates must be validated.
Network::URI proxy
Optional HTTP proxy URI. An empty URI uses a direct connection.
bool followRedirect { true }
Whether HTTP redirects should be followed.
bool clampToEdge { true }
Image-only texture wrapping policy. True selects ClampToEdge.
bool mipmaps { false }
Image-only option controlling mipmap generation.
bool compressTexture { false }
Image-only option requesting texture compression.
Float svgScale { 1.f }
Image-only SVG rasterization scale.
CompletionDispatcher completionDispatcher
Image-only completion dispatcher.
Image decode/upload completion must execute where a graphics context is current. This policy is not part of cache identity and only the request that starts a coalesced load supplies it.