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¶
WebProxy¶
Gets or sets the proxy applied to outgoing web requests.
public abstract IWebProxy WebProxy { get; set; }
Property Value¶
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¶
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¶
TimeoutInSeconds¶
Gets or sets the request timeout, in seconds.
public abstract int TimeoutInSeconds { get; set; }
Property Value¶
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;