Class FormData


  • public final class FormData
    extends java.lang.Object
    Simple model for `application/x-www-form-urlencoded` form data.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static FormData EMPTY
      Returns empty FormData.
    • Constructor Summary

      Constructors 
      Constructor Description
      FormData​(Query fields)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static FormData create​(akka.japi.Pair<java.lang.String,​java.lang.String>... params)
      Creates the FormData from the given parameters.
      static FormData create​(java.lang.Iterable<akka.japi.Pair<java.lang.String,​java.lang.String>> params)
      Creates a FormData from the given parameters.
      static FormData create​(java.util.Map<java.lang.String,​java.lang.String> params)
      Creates the FormData from the given parameters.
      RequestEntity toEntity()
      Converts this FormData to a RequestEntity using UTF8 encoding.
      RequestEntity toEntity​(HttpCharset charset)
      Deprecated.
      FormData always uses charset UTF-8 without appending the charset to 'Content-Type: application/x-www-form-urlencoded', use toEntity() instead.
      • Methods inherited from class java.lang.Object

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

      • EMPTY

        public static final FormData EMPTY
        Returns empty FormData.
    • Constructor Detail

      • FormData

        public FormData​(Query fields)
    • Method Detail

      • toEntity

        public RequestEntity toEntity()
        Converts this FormData to a RequestEntity using UTF8 encoding.
      • toEntity

        @Deprecated
        public RequestEntity toEntity​(HttpCharset charset)
        Deprecated.
        FormData always uses charset UTF-8 without appending the charset to 'Content-Type: application/x-www-form-urlencoded', use toEntity() instead.
        Converts this FormData to a RequestEntity using the given encoding.
      • create

        @SafeVarargs
        public static FormData create​(akka.japi.Pair<java.lang.String,​java.lang.String>... params)
        Creates the FormData from the given parameters.
      • create

        public static FormData create​(java.util.Map<java.lang.String,​java.lang.String> params)
        Creates the FormData from the given parameters.
      • create

        public static FormData create​(java.lang.Iterable<akka.japi.Pair<java.lang.String,​java.lang.String>> params)
        Creates a FormData from the given parameters.