Class IHttpForwarderExtensions
Extensions methods for IHttpForwarder.
Inheritance
Namespace: Yarp.ReverseProxy.Forwarder
Assembly: Yarp.ReverseProxy.dll
Syntax
public static class IHttpForwarderExtensions : object
Methods
| Improve this Doc View SourceSendAsync(IHttpForwarder, HttpContext, String, HttpMessageInvoker)
Forwards the incoming request to the destination server, and the response back to the client.
Declaration
public static ValueTask<ForwarderError> SendAsync(this IHttpForwarder forwarder, HttpContext context, string destinationPrefix, HttpMessageInvoker httpClient)
Parameters
Type | Name | Description |
---|---|---|
IHttpForwarder | forwarder | The forwarder instance. |
HttpContext | context | The HttpContext to forward. |
System.String | destinationPrefix | The url prefix for where to forward the request to. |
HttpMessageInvoker | httpClient | The HTTP client used to forward the request. |
Returns
Type | Description |
---|---|
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.
Declaration
public static ValueTask<ForwarderError> SendAsync(this IHttpForwarder forwarder, HttpContext context, string destinationPrefix, HttpMessageInvoker httpClient, Func<HttpContext, HttpRequestMessage, ValueTask> requestTransform)
Parameters
Type | Name | Description |
---|---|---|
IHttpForwarder | forwarder | The forwarder instance. |
HttpContext | context | The HttpContext to forward. |
System.String | destinationPrefix | The url prefix for where to forward the request to. |
HttpMessageInvoker | httpClient | The HTTP client used to forward the request. |
Func<HttpContext, HttpRequestMessage, ValueTask> | requestTransform | Transform function to apply to the forwarded request. |
Returns
Type | Description |
---|---|
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.
Declaration
public static ValueTask<ForwarderError> SendAsync(this IHttpForwarder forwarder, HttpContext context, string destinationPrefix, HttpMessageInvoker httpClient, ForwarderRequestConfig requestConfig)
Parameters
Type | Name | Description |
---|---|---|
IHttpForwarder | forwarder | The forwarder instance. |
HttpContext | context | The HttpContext to forward. |
System.String | destinationPrefix | The url prefix for where to forward the request to. |
HttpMessageInvoker | httpClient | The HTTP client used to forward the request. |
ForwarderRequestConfig | requestConfig | Config for the outgoing request. |
Returns
Type | Description |
---|---|
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.
Declaration
public static ValueTask<ForwarderError> SendAsync(this IHttpForwarder forwarder, HttpContext context, string destinationPrefix, HttpMessageInvoker httpClient, ForwarderRequestConfig requestConfig, Func<HttpContext, HttpRequestMessage, ValueTask> requestTransform)
Parameters
Type | Name | Description |
---|---|---|
IHttpForwarder | forwarder | The forwarder instance. |
HttpContext | context | The HttpContext to forward. |
System.String | destinationPrefix | The url prefix for where to forward the request to. |
HttpMessageInvoker | httpClient | The HTTP client used to forward the request. |
ForwarderRequestConfig | requestConfig | Config for the outgoing request. |
Func<HttpContext, HttpRequestMessage, ValueTask> | requestTransform | Transform function to apply to the forwarded request. |
Returns
Type | Description |
---|---|
ValueTask<ForwarderError> | The status of a forwarding operation. |