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
forwarderIHttpForwarderThe forwarder instance.
contextHttpContextThe HttpContext to forward.
destinationPrefixstringThe url prefix for where to forward the request to.
httpClientHttpMessageInvokerThe 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
forwarderIHttpForwarderThe forwarder instance.
contextHttpContextThe HttpContext to forward.
destinationPrefixstringThe url prefix for where to forward the request to.
httpClientHttpMessageInvokerThe HTTP client used to forward the request.
requestTransformFunc<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
forwarderIHttpForwarderThe forwarder instance.
contextHttpContextThe HttpContext to forward.
destinationPrefixstringThe url prefix for where to forward the request to.
httpClientHttpMessageInvokerThe HTTP client used to forward the request.
requestConfigForwarderRequestConfigConfig 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
forwarderIHttpForwarderThe forwarder instance.
contextHttpContextThe HttpContext to forward.
destinationPrefixstringThe url prefix for where to forward the request to.
httpClientHttpMessageInvokerThe HTTP client used to forward the request.
requestConfigForwarderRequestConfigConfig for the outgoing request.
requestTransformFunc<HttpContext, HttpRequestMessage, ValueTask>Transform function to apply to the forwarded request.
Returns
- ValueTask<ForwarderError>
The status of a forwarding operation.