Skip to content

IHttpRequestService

Namespace: ThinkGeo.Core

Abstraction that allows async layers to send HTTP requests while exposing hooks for request/response events.

public interface IHttpRequestService

Properties

HttpClient

Gets or sets the IHttpRequestService.HttpClient used to send requests.

public abstract HttpClient HttpClient { get; set; }

Property Value

HttpClient

WebProxy

Gets or sets the proxy applied to outgoing web requests.

public abstract IWebProxy WebProxy { get; set; }

Property Value

IWebProxy

UserAgent

This property allows you to specify a custom user-agent request header when making requests to a Web server. This header provides information about the client application or device and can be useful for server-side logging and analytics.

public abstract string UserAgent { get; set; }

Property Value

string

Credentials

This property gets or sets the base authentication interface for retrieving credentials for Web Client authentication.

public abstract ICredentials Credentials { get; set; }

Property Value

ICredentials

TimeoutInSeconds

Gets or sets the request timeout, in seconds.

public abstract int TimeoutInSeconds { get; set; }

Property Value

int

Events

SendingHttpRequest

Raised before an HttpRequestMessage is dispatched so callers can modify or cancel it.

public abstract event EventHandler<SendingHttpRequestMessageEventArgs> SendingHttpRequest;

ReceivedHttpResponse

Raised after the HTTP response is received.

public abstract event EventHandler<ReceivedHttpResponseMessageEventArgs> ReceivedHttpResponse;