Table of Contents

Class QueryTransformExtensions

Namespace
Yarp.ReverseProxy.Transforms
Assembly
Yarp.ReverseProxy.dll

Extensions for adding query transforms.

public static class QueryTransformExtensions
Inheritance
QueryTransformExtensions
Inherited Members

Methods

AddQueryRemoveKey(TransformBuilderContext, string)

Adds the transform that will remove the given query key.

public static TransformBuilderContext AddQueryRemoveKey(this TransformBuilderContext context, string queryKey)

Parameters

context TransformBuilderContext
queryKey string

Returns

TransformBuilderContext

AddQueryRouteValue(TransformBuilderContext, string, string, bool)

Adds the transform that will append or set the query parameter from a route value.

public static TransformBuilderContext AddQueryRouteValue(this TransformBuilderContext context, string queryKey, string routeValueKey, bool append = true)

Parameters

context TransformBuilderContext
queryKey string
routeValueKey string
append bool

Returns

TransformBuilderContext

AddQueryValue(TransformBuilderContext, string, string, bool)

Adds the transform that will append or set the query parameter from the given value.

public static TransformBuilderContext AddQueryValue(this TransformBuilderContext context, string queryKey, string value, bool append = true)

Parameters

context TransformBuilderContext
queryKey string
value string
append bool

Returns

TransformBuilderContext

WithTransformQueryRemoveKey(RouteConfig, string)

Clones the route and adds the transform that will remove the given query key.

public static RouteConfig WithTransformQueryRemoveKey(this RouteConfig route, string queryKey)

Parameters

route RouteConfig
queryKey string

Returns

RouteConfig

WithTransformQueryRouteValue(RouteConfig, string, string, bool)

Clones the route and adds the transform that will append or set the query parameter from a route value.

public static RouteConfig WithTransformQueryRouteValue(this RouteConfig route, string queryKey, string routeValueKey, bool append = true)

Parameters

route RouteConfig
queryKey string
routeValueKey string
append bool

Returns

RouteConfig

WithTransformQueryValue(RouteConfig, string, string, bool)

Clones the route and adds the transform that will append or set the query parameter from the given value.

public static RouteConfig WithTransformQueryValue(this RouteConfig route, string queryKey, string value, bool append = true)

Parameters

route RouteConfig
queryKey string
value string
append bool

Returns

RouteConfig