<PackageReference Include="Azure.Core" Version="1.48.0" />

HttpPipeline

public class HttpPipeline
Represents a primitive for sending HTTP requests and receiving responses extensible by adding HttpPipelinePolicy processing steps.

The ResponseClassifier instance used in this pipeline invocations.

public HttpPipeline(HttpPipelineTransport transport, HttpPipelinePolicy[] policies = null, ResponseClassifier responseClassifier = null)

Creates a new instance of HttpPipeline with the provided transport, policies and response classifier.

public static IDisposable CreateClientRequestIdScope(string clientRequestId)

Creates a scope in which all outgoing requests would use the provided

public static IDisposable CreateHttpMessagePropertiesScope(IDictionary<string, object> messageProperties)

Creates a scope in which all HttpMessages would have provided properties.

Creates a new HttpMessage instance.

public HttpMessage CreateMessage(RequestContext context, ResponseClassifier classifier = null)

Creates a new HttpMessage instance.

Creates a new Request instance.

public void Send(HttpMessage message, CancellationToken cancellationToken)

Invokes the pipeline synchronously. After the task completes response would be set to the Response property.

public ValueTask SendAsync(HttpMessage message, CancellationToken cancellationToken)

Invokes the pipeline asynchronously. After the task completes response would be set to the Response property.

public Response SendRequest(Request request, CancellationToken cancellationToken)

Invokes the pipeline synchronously with the provided request.

public ValueTask<Response> SendRequestAsync(Request request, CancellationToken cancellationToken)

Invokes the pipeline asynchronously with the provided request.