共用方式為


HttpClientPipelineTransport Class

Definition

An implementation of PipelineTransport that uses a HttpClient to send and receive HTTP requests and responses.

public class HttpClientPipelineTransport : System.ClientModel.Primitives.PipelineTransport, IDisposable
type HttpClientPipelineTransport = class
    inherit PipelineTransport
    interface IDisposable
Public Class HttpClientPipelineTransport
Inherits PipelineTransport
Implements IDisposable
Inheritance
HttpClientPipelineTransport
Implements

Constructors

HttpClientPipelineTransport()

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

HttpClientPipelineTransport(HttpClient)

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

Properties

Shared

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

Methods

CreateMessage()

Create an instance of PipelineMessage that can be sent using this transport instance. This method will rarely be called directly; CreateMessage() should be called instead.

(Inherited from PipelineTransport)
CreateMessageCore()

Creates a new transport-specific instance of PipelineMessage. Types that derive from PipelineTransport must implement this method to provide transport-specific functionality.

Dispose()

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

Dispose(Boolean)

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

OnReceivedResponse(PipelineMessage, HttpResponseMessage)

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

OnSendingRequest(PipelineMessage, HttpRequestMessage)

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

Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32)

Implementation of Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32). Since the transport is the last policy in the ClientPipeline policy chain, this method does not call ProcessNext(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) as other policy implementations do.

(Inherited from PipelineTransport)
Process(PipelineMessage)

Sends the HTTP request contained by Request and sets the value of Response.

(Inherited from PipelineTransport)
ProcessAsync(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32)

Implementation of Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32). Since the transport is the last policy in the ClientPipeline policy chain, this method does not call ProcessNext(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) as other policy implementations do.

(Inherited from PipelineTransport)
ProcessAsync(PipelineMessage)

Sends the HTTP request contained by Request and sets the value of Response.

(Inherited from PipelineTransport)
ProcessCore(PipelineMessage)

Transport-specific implementation used to sends the HTTP request contained by Request and set the value of Response. Types that derive from PipelineTransport must implement this method to provide transport-specific functionality.

ProcessCoreAsync(PipelineMessage)

Transport-specific implementation used to sends the HTTP request contained by Request and set the value of Response. Types that derive from PipelineTransport must implement this method to provide transport-specific functionality.

Applies to