Class HttpKt

  • All Implemented Interfaces:

    
    public final class HttpKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final static List<String> CHECKED_HEADERS
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<String> getCHECKED_HEADERS() Headers handled by HTTP model as headers with special meaning.
      final static String basicAuth(String user, String password)
      final static Unit checkHeaders(Headers headers)
      final static QueryParameters parseQueryString(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 formatQueryString(QueryParameters parameters)
      final static String urlDecode(String $self)
      final static String urlEncode(String $self)
      final static String toHttpFormat(LocalDateTime $self)
      final static String toHttpFormat(Instant $self)
      final static ContentType parseContentType(String contentType)
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getCHECKED_HEADERS

         final List<String> getCHECKED_HEADERS()

        Headers handled by HTTP model as headers with special meaning.

      • basicAuth

         final static String basicAuth(String user, String password)
      • parseQueryString

         final static QueryParameters parseQueryString(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.
        Returns:

        Map with query parameter keys bound to a list with their values.

      • urlDecode

         final static String urlDecode(String $self)
      • urlEncode

         final static String urlEncode(String $self)
      • toHttpFormat

         final static String toHttpFormat(LocalDateTime $self)
      • toHttpFormat

         final static String toHttpFormat(Instant $self)