Interface IGraphHttpClient
Interface for Http transport client. Gives us a way to work with different instances of GraphClient through Dependency Injection.
Inherited Members
Namespace: Microsoft.Graph.Communications.Common.Transport
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
public interface IGraphHttpClient : IGraphClient
Properties
CustomRedirectUriGenerator
Gets or sets the custom redirect URI generator. This is called in case of a redirect (3XX) response from the request. Clients can use this to read the response and give the new redirect url to call in the next request.
Declaration
Func<HttpResponseMessage, Uri> CustomRedirectUriGenerator { get; set; }
Property Value
Type | Description |
---|---|
Func<HttpResponseMessage, Uri> | The custom redirect URI generator. |
Methods
Clone(HttpClient)
Clones this instance with optional overrides.
Declaration
IGraphHttpClient Clone(HttpClient httpClient = null)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | httpClient | The HTTP client to replace the original. |
Returns
Type | Description |
---|---|
IGraphHttpClient | Cloned client with the updated properties. |
SendRawHttpRequestAsync(HttpRequestMessage, CancellationToken)
Send a Http request as an asynchronous operation. The content sent using this is not parsed or logged.
Declaration
Task<HttpResponseMessage> SendRawHttpRequestAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
HttpRequestMessage | httpRequest | The http request message to send. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<HttpResponseMessage> | The task object representing the asynchronous operation. |