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
    • Constructor Detail

    • Method Detail

      • getBODY_TYPES

         final Set<KClass<out Serializable>> getBODY_TYPES()
      • 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.
      • 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)
      • bodyToBytes

         final static ByteArray bodyToBytes(Object body)