[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Workbook.WebRequestHandler

WebRequestHandler Property

WebRequestHandler

Gets or sets the singleton instance of the IWebRequestHandler implementation that will be used to handle web requests.

This property provides a centralized way to access and set the web request handler for the application. It is used by workbook features that need to retrieve remote content, such as the IMAGE() function when the image source is a web URL.

Declaration
public static IWebRequestHandler WebRequestHandler { get; set; }
Public Shared Property WebRequestHandler As IWebRequestHandler
Property Value
Type Description
IWebRequestHandler

The singleton IWebRequestHandler instance, or null if no handler has been set.

Examples
class WebHandler : IWebRequestHandler
{
    public Task<WebRequestResult> GetAsync(string requestUri)
    {
        return Task.FromResult(new WebRequestResult());
    }
}

IWebRequestHandler handler = new WebHandler();
Workbook.WebRequestHandler = handler;
IWebRequestHandler currentHandler = Workbook.WebRequestHandler;