Package org.restheart.utils
Class URLUtils
- java.lang.Object
-
- org.restheart.utils.URLUtils
-
public class URLUtils extends Object
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
-
Constructor Summary
Constructors Constructor Description URLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringdecodeQueryString(String qs)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 StringremoveTrailingSlashes(String s)given string /ciao/this/has/trailings///// returns /ciao/this/has/trailings
-
-
-
Method Detail
-
removeTrailingSlashes
public static String removeTrailingSlashes(String s)
given string /ciao/this/has/trailings///// returns /ciao/this/has/trailings- Parameters:
s-- Returns:
- the string s without the trailing slashes
-
decodeQueryString
public static String decodeQueryString(String qs)
decode the percent encoded query string- Parameters:
qs-- Returns:
- the undecoded string
-
getPrefixUrl
public static String getPrefixUrl(io.undertow.server.HttpServerExchange exchange)
- Parameters:
exchange-- Returns:
-
getQueryStringRemovingParams
public static String getQueryStringRemovingParams(io.undertow.server.HttpServerExchange exchange, String... paramsToRemove)
- Parameters:
exchange-paramsToRemove-- Returns:
-
getIdString
public static String getIdString(org.bson.BsonValue id) throws UnsupportedDocumentIdException
- Parameters:
id-- Returns:
- Throws:
UnsupportedDocumentIdException
-
-