Dela via


IHttpForwarder.SendAsync Method

Definition

Overloads

SendAsync(HttpContext, String, HttpMessageInvoker, ForwarderRequestConfig, HttpTransformer)

Forwards the incoming request to the destination server, and the response back to the client.

SendAsync(HttpContext, String, HttpMessageInvoker, ForwarderRequestConfig, HttpTransformer, CancellationToken)

Forwards the incoming request to the destination server, and the response back to the client.

SendAsync(HttpContext, String, HttpMessageInvoker, ForwarderRequestConfig, HttpTransformer)

Source:
IHttpForwarder.cs
Source:
IHttpForwarder.cs

Forwards the incoming request to the destination server, and the response back to the client.

public System.Threading.Tasks.ValueTask<Yarp.ReverseProxy.Forwarder.ForwarderError> SendAsync (Microsoft.AspNetCore.Http.HttpContext context, string destinationPrefix, System.Net.Http.HttpMessageInvoker httpClient, Yarp.ReverseProxy.Forwarder.ForwarderRequestConfig requestConfig, Yarp.ReverseProxy.Forwarder.HttpTransformer transformer);
abstract member SendAsync : Microsoft.AspNetCore.Http.HttpContext * string * System.Net.Http.HttpMessageInvoker * Yarp.ReverseProxy.Forwarder.ForwarderRequestConfig * Yarp.ReverseProxy.Forwarder.HttpTransformer -> System.Threading.Tasks.ValueTask<Yarp.ReverseProxy.Forwarder.ForwarderError>
Public Function SendAsync (context As HttpContext, destinationPrefix As String, httpClient As HttpMessageInvoker, requestConfig As ForwarderRequestConfig, transformer As HttpTransformer) As ValueTask(Of ForwarderError)

Parameters

context
HttpContext

The HttpContext to forward.

destinationPrefix
String

The url prefix for where to forward the request to.

httpClient
HttpMessageInvoker

The HTTP client used to forward the request.

requestConfig
ForwarderRequestConfig

Config for the outgoing request.

transformer
HttpTransformer

Request and response transforms. Use Default if custom transformations are not needed.

Returns

The result of forwarding the request and response.

Applies to

SendAsync(HttpContext, String, HttpMessageInvoker, ForwarderRequestConfig, HttpTransformer, CancellationToken)

Source:
IHttpForwarder.cs
Source:
IHttpForwarder.cs

Forwards the incoming request to the destination server, and the response back to the client.

public virtual System.Threading.Tasks.ValueTask<Yarp.ReverseProxy.Forwarder.ForwarderError> SendAsync (Microsoft.AspNetCore.Http.HttpContext context, string destinationPrefix, System.Net.Http.HttpMessageInvoker httpClient, Yarp.ReverseProxy.Forwarder.ForwarderRequestConfig requestConfig, Yarp.ReverseProxy.Forwarder.HttpTransformer transformer, System.Threading.CancellationToken cancellationToken);
abstract member SendAsync : Microsoft.AspNetCore.Http.HttpContext * string * System.Net.Http.HttpMessageInvoker * Yarp.ReverseProxy.Forwarder.ForwarderRequestConfig * Yarp.ReverseProxy.Forwarder.HttpTransformer * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Yarp.ReverseProxy.Forwarder.ForwarderError>
override this.SendAsync : Microsoft.AspNetCore.Http.HttpContext * string * System.Net.Http.HttpMessageInvoker * Yarp.ReverseProxy.Forwarder.ForwarderRequestConfig * Yarp.ReverseProxy.Forwarder.HttpTransformer * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Yarp.ReverseProxy.Forwarder.ForwarderError>
Public Overridable Function SendAsync (context As HttpContext, destinationPrefix As String, httpClient As HttpMessageInvoker, requestConfig As ForwarderRequestConfig, transformer As HttpTransformer, cancellationToken As CancellationToken) As ValueTask(Of ForwarderError)

Parameters

context
HttpContext

The HttpContext to forward.

destinationPrefix
String

The url prefix for where to forward the request to.

httpClient
HttpMessageInvoker

The HTTP client used to forward the request.

requestConfig
ForwarderRequestConfig

Config for the outgoing request.

transformer
HttpTransformer

Request and response transforms. Use Default if custom transformations are not needed.

cancellationToken
CancellationToken

A cancellation token that can be used to abort the request.

Returns

The result of forwarding the request and response.

Applies to