Package org.restheart.utils
Class URLUtils
java.lang.Object
org.restheart.utils.URLUtils
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdecodeQueryString(io.undertow.server.HttpServerExchange exchange) decode the percent encoded query stringstatic Stringdecode the percent encoded query stringstatic StringdecodeQueryString(String qs, String enc) decode the percent encoded query stringstatic StringgetIdString(org.bson.BsonValue id) static StringgetParentPath(String path) static StringgetPrefixUrl(io.undertow.server.HttpServerExchange exchange) static StringgetQueryStringRemovingParams(io.undertow.server.HttpServerExchange exchange, String... paramsToRemove) static Stringgiven string /ciao/this/has/trailings///// returns /ciao/this/has/trailings
-
Constructor Details
-
URLUtils
protected URLUtils()
-
-
Method Details
-
removeTrailingSlashes
given string /ciao/this/has/trailings///// returns /ciao/this/has/trailings- Parameters:
s-- Returns:
- the string s without the trailing slashes
-
decodeQueryString
decode the percent encoded query string- Parameters:
qs-- Returns:
- the decoded query string
-
decodeQueryString
decode the percent encoded query string- Parameters:
qs-enc- encoding name- Returns:
- the decoded query string
-
decodeQueryString
decode the percent encoded query string- Parameters:
exchange-- Returns:
- the decoded query string
-
getParentPath
- Parameters:
path-- Returns:
- the parent path of path
-
getPrefixUrl
- Parameters:
exchange-- Returns:
- the prefix url of the exchange
-
getQueryStringRemovingParams
public static String getQueryStringRemovingParams(io.undertow.server.HttpServerExchange exchange, String... paramsToRemove) - Parameters:
exchange-paramsToRemove-- Returns:
-
getIdString
- Parameters:
id-- Returns:
- Throws:
UnsupportedDocumentIdException
-