Package 

Class HttpKt

  • All Implemented Interfaces:

    
    public final class HttpKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final LinkedHashSet<Method> getALL() Set containing all HTTP methods.
      final static Route any(String path) Shortcut to create a route for a filter (with all methods).
      final static Route get(String path) Shortcut to create a GET route.
      final static Route head(String path) Shortcut to create a HEAD route.
      final static Route post(String path) Shortcut to create a POST route.
      final static Route put(String path) Shortcut to create a PUT route.
      final static Route delete(String path) Shortcut to create a DELETE route.
      final static Route trace(String path) Shortcut to create a TRACE route.
      final static Route options(String path) Shortcut to create a OPTIONS route.
      final static Route patch(String path) Shortcut to create a PATCH route.
      final static Map<String, List<String>> parseQueryParameters(String query) Parse query string such as paramA=valueA&paramB=valueB into 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 String httpDate(LocalDateTime date)
      final static String urlDecode(String $self)
      final static String urlEncode(String $self)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • any

         final static Route any(String path)

        Shortcut to create a route for a filter (with all methods).

      • get

         final static Route get(String path)

        Shortcut to create a GET route.

      • head

         final static Route head(String path)

        Shortcut to create a HEAD route.

      • post

         final static Route post(String path)

        Shortcut to create a POST route.

      • put

         final static Route put(String path)

        Shortcut to create a PUT route.

      • trace

         final static Route trace(String path)

        Shortcut to create a TRACE route.

      • patch

         final static Route patch(String path)

        Shortcut to create a PATCH route.

      • parseQueryParameters

         final static Map<String, List<String>> parseQueryParameters(String query)

        Parse query string such as paramA=valueA&paramB=valueB into 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= or foo) will result into an empty string value.

        Parameters:
        query - URL query string.