ClientPipeline.SendAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| SendAsync(PipelineMessage) |
Send the provided PipelineMessage. |
| SendAsync(PipelineMessage, CancellationToken) |
Send the provided PipelineMessage using the specified cancellation token. |
SendAsync(PipelineMessage)
- Source:
- ClientPipeline.cs
- Source:
- ClientPipeline.cs
Send the provided PipelineMessage.
public System.Threading.Tasks.ValueTask SendAsync(System.ClientModel.Primitives.PipelineMessage message);
member this.SendAsync : System.ClientModel.Primitives.PipelineMessage -> System.Threading.Tasks.ValueTask
Public Function SendAsync (message As PipelineMessage) As ValueTask
Parameters
- message
- PipelineMessage
The PipelineMessage to send.
Returns
Exceptions
Thrown if an error other than the service responding with an error response occurred while sending the HTTP request.
Remarks
All necessary values on Request should be set prior to calling Send(PipelineMessage). After the method returns, Response will be populated with the details of the service response.
Applies to
SendAsync(PipelineMessage, CancellationToken)
- Source:
- ClientPipeline.cs
Send the provided PipelineMessage using the specified cancellation token.
public System.Threading.Tasks.ValueTask SendAsync(System.ClientModel.Primitives.PipelineMessage message, System.Threading.CancellationToken cancellationToken);
member this.SendAsync : System.ClientModel.Primitives.PipelineMessage * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function SendAsync (message As PipelineMessage, cancellationToken As CancellationToken) As ValueTask
Parameters
- message
- PipelineMessage
The PipelineMessage to send.
- cancellationToken
- CancellationToken
The CancellationToken to use instead of the message's current cancellation token.
Returns
A task representing the asynchronous send operation.
Exceptions
Thrown if an error other than the service responding with an error response occurred while sending the HTTP request.
Remarks
All necessary values on Request should be set prior to calling this method. After the method returns, Response will be populated with the details of the service response. The supplied token replaces CancellationToken, including when it is None. It is not combined with the previous token. Other options already applied to the message are preserved, and the original RequestOptions instance is not modified.