struct EE::UI::WebResourceResult

Overview

Result delivered to a WebResourceCache subscriber. More…

#include <webresourcecache.hpp>

struct WebResourceResult {
    // fields

    bool success { false };
    WebResourceLoadState state { WebResourceLoadState::Empty };
    int status { 0 };
    std::string error;
    std::string setCookie;
    std::shared_ptr<const std::string> data;
    Graphics::TexturePtr texture;
};

Detailed Documentation

Result delivered to a WebResourceCache subscriber.

Data resources set data, while image resources set texture. A texture request may already have returned the same TexturePtr as a transparent placeholder before this result is delivered.

Fields

bool success { false }

True when the request completed and produced a usable resource.

WebResourceLoadState state { WebResourceLoadState::Empty }

Final cache-entry state observed by this completion.

int status { 0 }

Numeric HTTP response status.

std::string error

Failure description. Empty for successful results.

std::string setCookie

Set-Cookie value from the final response, or from its redirect chain when applicable.

std::shared_ptr<const std::string> data

Shared immutable response body for documents, stylesheets, and fonts.

Graphics::TexturePtr texture

Shared texture for image resources.