HttpTransformer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public class HttpTransformer
type HttpTransformer = class
Public Class HttpTransformer
- Inheritance
-
HttpTransformer
Constructors
HttpTransformer() |
Used to create derived instances. |
Fields
Default |
A default set of transforms that adds X-Forwarded-* headers, removes the original Host value and copies all other request and response fields and headers, except for some protocol specific values. |
Empty |
An empty transformer that copies all request and response fields and headers, except for some protocol specific values. |
Methods
TransformRequestAsync(HttpContext, HttpRequestMessage, String, CancellationToken) |
A callback that is invoked prior to sending the proxied request. All HttpRequestMessage fields are
initialized except RequestUri, which will be initialized after the callback if no value is provided.
See MakeDestinationAddress(String, PathString, QueryString) for constructing a custom request Uri.
The string parameter represents the destination URI prefix that should be used when constructing the RequestUri.
The headers are copied by the base implementation, excluding some protocol headers like HTTP/2 pseudo headers (":authority").
This method may be overridden to conditionally produce a response, such as for error conditions, and prevent the request from
being proxied. This is indicated by setting the |
TransformRequestAsync(HttpContext, HttpRequestMessage, String) |
Obsolete.
A callback that is invoked prior to sending the proxied request. All HttpRequestMessage fields are
initialized except RequestUri, which will be initialized after the callback if no value is provided.
See MakeDestinationAddress(String, PathString, QueryString) for constructing a custom request Uri.
The string parameter represents the destination URI prefix that should be used when constructing the RequestUri.
The headers are copied by the base implementation, excluding some protocol headers like HTTP/2 pseudo headers (":authority").
This method may be overridden to conditionally produce a response, such as for error conditions, and prevent the request from
being proxied. This is indicated by setting the |
TransformResponseAsync(HttpContext, HttpResponseMessage, CancellationToken) |
A callback that is invoked when the proxied response is received. The status code and reason phrase will be copied
to the HttpContext.Response before the callback is invoked, but may still be modified there. The headers will be
copied to HttpContext.Response.Headers by the base implementation, excludes certain protocol headers like
|
TransformResponseAsync(HttpContext, HttpResponseMessage) |
Obsolete.
A callback that is invoked when the proxied response is received. The status code and reason phrase will be copied
to the HttpContext.Response before the callback is invoked, but may still be modified there. The headers will be
copied to HttpContext.Response.Headers by the base implementation, excludes certain protocol headers like
|
TransformResponseTrailersAsync(HttpContext, HttpResponseMessage, CancellationToken) |
A callback that is invoked after the response body to modify trailers, if supported. The trailers will be copied to the HttpContext.Response by the base implementation. |
TransformResponseTrailersAsync(HttpContext, HttpResponseMessage) |
Obsolete.
A callback that is invoked after the response body to modify trailers, if supported. The trailers will be copied to the HttpContext.Response by the base implementation. |