Class RequestTransformContext
Transform state for use with RequestTransform
Inheritance
Namespace: Yarp.ReverseProxy.Transforms
Assembly: Yarp.ReverseProxy.dll
Syntax
public class RequestTransformContext : object
Properties
| Improve this Doc View SourceCancellationToken
A CancellationToken indicating that the request is being aborted.
Declaration
public CancellationToken CancellationToken { get; set; }
Property Value
Type | Description |
---|---|
CancellationToken |
DestinationPrefix
The URI prefix for the proxy request. This includes the scheme and host and can optionally include a port and path base. The 'Path' and 'Query' properties will be appended to this after the transforms have run. Changing this value can have side effects on load balancing and health checks.
Declaration
public string DestinationPrefix { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HeadersCopied
Gets or sets if the request headers have been copied from the HttpRequest to the HttpRequestMessage and HttpContent. Transforms use this when searching for the current value of a header they should operate on.
Declaration
public bool HeadersCopied { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
HttpContext
The current request context.
Declaration
public HttpContext HttpContext { get; set; }
Property Value
Type | Description |
---|---|
HttpContext |
Path
The path to use for the proxy request.
Declaration
public PathString Path { get; set; }
Property Value
Type | Description |
---|---|
PathString |
Remarks
This will be prefixed by any PathBase specified for the destination server.
ProxyRequest
The outgoing proxy request. All field are initialized except for the 'RequestUri' and optionally headers. If no value is provided then the 'RequestUri' will be initialized using the updated 'DestinationPrefix', 'Path', and 'Query' properties after the transforms have run. The headers will be copied later when applying header transforms.
Declaration
public HttpRequestMessage ProxyRequest { get; set; }
Property Value
Type | Description |
---|---|
HttpRequestMessage |
Query
The query used for the proxy request.
Declaration
public QueryTransformContext Query { get; set; }
Property Value
Type | Description |
---|---|
QueryTransformContext |