public class HttpRequestPathHelper extends Object
Constructor and Description |
---|
HttpRequestPathHelper() |
Modifier and Type | Method and Description |
---|---|
org.springframework.util.MultiValueMap<String,String> |
decodeMatrixVariables(ServerWebExchange exchange,
org.springframework.util.MultiValueMap<String,String> vars)
Decode the given matrix variables unless
setUrlDecode(boolean)
is set to true in which case it is assumed the URL path from
which the variables were extracted is already decoded through a call to
getLookupPathForRequest(ServerWebExchange) . |
Map<String,String> |
decodePathVariables(ServerWebExchange exchange,
Map<String,String> vars)
Decode the given URI path variables unless
setUrlDecode(boolean)
is set to true in which case it is assumed the URL path from
which the variables were extracted is already decoded through a call to
getLookupPathForRequest(ServerWebExchange) . |
String |
getLookupPathForRequest(ServerWebExchange exchange) |
void |
setUrlDecode(boolean urlDecode)
Set if the request path should be URL-decoded.
|
boolean |
shouldUrlDecode()
Whether the request path should be URL decoded.
|
public void setUrlDecode(boolean urlDecode)
Default is "true".
UriUtils.decode(String, String)
public boolean shouldUrlDecode()
public String getLookupPathForRequest(ServerWebExchange exchange)
public Map<String,String> decodePathVariables(ServerWebExchange exchange, Map<String,String> vars)
setUrlDecode(boolean)
is set to true
in which case it is assumed the URL path from
which the variables were extracted is already decoded through a call to
getLookupPathForRequest(ServerWebExchange)
.exchange
- current exchangevars
- URI variables extracted from the URL pathpublic org.springframework.util.MultiValueMap<String,String> decodeMatrixVariables(ServerWebExchange exchange, org.springframework.util.MultiValueMap<String,String> vars)
setUrlDecode(boolean)
is set to true
in which case it is assumed the URL path from
which the variables were extracted is already decoded through a call to
getLookupPathForRequest(ServerWebExchange)
.exchange
- current exchangevars
- URI variables extracted from the URL path