-
- All Implemented Interfaces:
public final class HttpKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static LinkedHashSet<Method>ALL
-
Method Summary
Modifier and Type Method Description final LinkedHashSet<Method>getALL()Set containing all HTTP methods. final static Routeany(String path)Shortcut to create a route for a filter (with all methods). final static Routeget(String path)Shortcut to create a GET route. final static Routehead(String path)Shortcut to create a HEAD route. final static Routepost(String path)Shortcut to create a POST route. final static Routeput(String path)Shortcut to create a PUT route. final static Routedelete(String path)Shortcut to create a DELETE route. final static Routetrace(String path)Shortcut to create a TRACE route. final static Routeoptions(String path)Shortcut to create a OPTIONS route. final static Routepatch(String path)Shortcut to create a PATCH route. final static Map<String, List<String>>parseQueryParameters(String query)Parse query string such as paramA=valueA¶mB=valueBinto a map of several key-value pairs separated by '&' where key is the param name before '=' as String and value is the string after '=' as a list of String (as a query parameter may have many values).final static StringhttpDate(LocalDateTime date)final static StringurlDecode(String $self)final static StringurlEncode(String $self)-
-
Method Detail
-
getALL
final LinkedHashSet<Method> getALL()
Set containing all HTTP methods.
-
parseQueryParameters
final static Map<String, List<String>> parseQueryParameters(String query)
Parse query string such as
paramA=valueA¶mB=valueBinto a map of several key-value pairs separated by '&' where key is the param name before '=' as String and value is the string after '=' as a list of String (as a query parameter may have many values).Note: Missing the '=' sign, or missing value after '=' (e.g
foo=orfoo) will result into an empty string value.- Parameters:
query- URL query string.
-
httpDate
final static String httpDate(LocalDateTime date)
-
-
-
-