<PackageReference Include="System.ClientModel" Version="1.7.0" />

HttpClientPipelineTransport

An implementation of PipelineTransport that uses a HttpClient to send and receive HTTP requests and responses.
public static HttpClientPipelineTransport Shared { get; }

A default instance of HttpClientPipelineTransport that can be shared across pipelines and clients.

Create a new instance of HttpClientPipelineTransport that uses a shared default instance of HttpClient.

Create a new instance of HttpClientPipelineTransport that uses the provided HttpClient.

public HttpClientPipelineTransport(HttpClient client, bool enableLogging, ILoggerFactory loggerFactory)

Create a new instance of HttpClientPipelineTransport that uses the provided HttpClient.

public void Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

protected virtual void Dispose(bool disposing)

Releases the unmanaged resources used by the HttpClientPipelineTransport and optionally disposes of the managed resources.

protected virtual void OnReceivedResponse(PipelineMessage message, HttpResponseMessage httpResponse)

A method that can be overridden by derived types to extend the default HttpClientPipelineTransport logic. It is called from ProcessCore after the transport has created the PipelineResponse and set it on Response.

protected virtual void OnSendingRequest(PipelineMessage message, HttpRequestMessage httpRequest)

A method that can be overridden by derived types to extend the default HttpClientPipelineTransport logic. It is called from ProcessCore prior to sending the HTTP request.