ResponseTrailersTransform.TakeHeader Method
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.
Removes and returns the current trailer value by first checking the HttpResponse and falling back to the value from HttpResponseMessage only if HeadersCopied is not set. This ordering allows multiple transforms to mutate the same header.
public static Microsoft.Extensions.Primitives.StringValues TakeHeader(Yarp.ReverseProxy.Transforms.ResponseTrailersTransformContext context, string headerName);
static member TakeHeader : Yarp.ReverseProxy.Transforms.ResponseTrailersTransformContext * string -> Microsoft.Extensions.Primitives.StringValues
Public Shared Function TakeHeader (context As ResponseTrailersTransformContext, headerName As String) As StringValues
Parameters
- context
- ResponseTrailersTransformContext
The transform context.
- headerName
- String
The name of the header to take.
Returns
The response header value, or StringValues.Empty if none.