Show / Hide Table of Contents

Interface IHttpForwarder

Forward an HTTP request to a chosen destination.

Namespace: Yarp.ReverseProxy.Forwarder
Assembly: Yarp.ReverseProxy.dll
Syntax
public interface IHttpForwarder

Methods

| Improve this Doc View Source

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

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

Declaration
ValueTask<ForwarderError> SendAsync(HttpContext context, string destinationPrefix, HttpMessageInvoker httpClient, ForwarderRequestConfig requestConfig, HttpTransformer transformer)
Parameters
Type Name Description
HttpContext context

The HttpContext to forward.

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.

HttpTransformer transformer

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

Returns
Type Description
ValueTask<ForwarderError>

The result of forwarding the request and response.

Extension Methods

IHttpForwarderExtensions.SendAsync(IHttpForwarder, HttpContext, String, HttpMessageInvoker)
IHttpForwarderExtensions.SendAsync(IHttpForwarder, HttpContext, String, HttpMessageInvoker, ForwarderRequestConfig)
IHttpForwarderExtensions.SendAsync(IHttpForwarder, HttpContext, String, HttpMessageInvoker, Func<HttpContext, HttpRequestMessage, ValueTask>)
IHttpForwarderExtensions.SendAsync(IHttpForwarder, HttpContext, String, HttpMessageInvoker, ForwarderRequestConfig, Func<HttpContext, HttpRequestMessage, ValueTask>)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX