Class IHttpForwarderExtensions
- Namespace
- Yarp.ReverseProxy.Forwarder
- Assembly
- Yarp.ReverseProxy.dll
Extensions methods for IHttpForwarder.
public static class IHttpForwarderExtensions
- Inheritance
-
IHttpForwarderExtensions
- Inherited Members
Methods
SendAsync(IHttpForwarder, HttpContext, string, HttpMessageInvoker)
Forwards the incoming request to the destination server, and the response back to the client.
public static ValueTask<ForwarderError> SendAsync(this IHttpForwarder forwarder, HttpContext context, string destinationPrefix, HttpMessageInvoker httpClient)
Parameters
forwarder
IHttpForwarderThe forwarder instance.
context
HttpContextThe HttpContext to forward.
destinationPrefix
stringThe url prefix for where to forward the request to.
httpClient
HttpMessageInvokerThe HTTP client used to forward the request.
Returns
- ValueTask<ForwarderError>
The status of a forwarding operation.
SendAsync(IHttpForwarder, HttpContext, string, HttpMessageInvoker, Func<HttpContext, HttpRequestMessage, ValueTask>)
Forwards the incoming request to the destination server, and the response back to the client.
public static ValueTask<ForwarderError> SendAsync(this IHttpForwarder forwarder, HttpContext context, string destinationPrefix, HttpMessageInvoker httpClient, Func<HttpContext, HttpRequestMessage, ValueTask> requestTransform)
Parameters
forwarder
IHttpForwarderThe forwarder instance.
context
HttpContextThe HttpContext to forward.
destinationPrefix
stringThe url prefix for where to forward the request to.
httpClient
HttpMessageInvokerThe HTTP client used to forward the request.
requestTransform
Func<HttpContext, HttpRequestMessage, ValueTask>Transform function to apply to the forwarded request.
Returns
- ValueTask<ForwarderError>
The status of a forwarding operation.
SendAsync(IHttpForwarder, HttpContext, string, HttpMessageInvoker, ForwarderRequestConfig)
Forwards the incoming request to the destination server, and the response back to the client.
public static ValueTask<ForwarderError> SendAsync(this IHttpForwarder forwarder, HttpContext context, string destinationPrefix, HttpMessageInvoker httpClient, ForwarderRequestConfig requestConfig)
Parameters
forwarder
IHttpForwarderThe forwarder instance.
context
HttpContextThe HttpContext to forward.
destinationPrefix
stringThe url prefix for where to forward the request to.
httpClient
HttpMessageInvokerThe HTTP client used to forward the request.
requestConfig
ForwarderRequestConfigConfig for the outgoing request.
Returns
- ValueTask<ForwarderError>
The status of a forwarding operation.
SendAsync(IHttpForwarder, HttpContext, string, HttpMessageInvoker, ForwarderRequestConfig, Func<HttpContext, HttpRequestMessage, ValueTask>)
Forwards the incoming request to the destination server, and the response back to the client.
public static ValueTask<ForwarderError> SendAsync(this IHttpForwarder forwarder, HttpContext context, string destinationPrefix, HttpMessageInvoker httpClient, ForwarderRequestConfig requestConfig, Func<HttpContext, HttpRequestMessage, ValueTask> requestTransform)
Parameters
forwarder
IHttpForwarderThe forwarder instance.
context
HttpContextThe HttpContext to forward.
destinationPrefix
stringThe url prefix for where to forward the request to.
httpClient
HttpMessageInvokerThe HTTP client used to forward the request.
requestConfig
ForwarderRequestConfigConfig for the outgoing request.
requestTransform
Func<HttpContext, HttpRequestMessage, ValueTask>Transform function to apply to the forwarded request.
Returns
- ValueTask<ForwarderError>
The status of a forwarding operation.