Package org.apache.hc.core5.net
Class WWWFormCodec
java.lang.Object
org.apache.hc.core5.net.WWWFormCodec
application/x-www-form-urlencoded codec.- Since:
- 5.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringformat(Iterable<? extends NameValuePair> params, Charset charset) Formats the list ofNameValuePairparameters into aapplication/x-www-form-urlencodedcontent string.static voidformat(StringBuilder buf, Iterable<? extends NameValuePair> params, Charset charset) Formats the list ofNameValuePairparameters into aapplication/x-www-form-urlencodedcontent.static List<NameValuePair> parse(CharSequence s, Charset charset) Returns a list ofNameValuePairparameters parsed from theapplication/x-www-form-urlencodedcontent.
-
Field Details
-
QP_SEP_A
private static final char QP_SEP_A- See Also:
-
-
Constructor Details
-
WWWFormCodec
public WWWFormCodec()
-
-
Method Details
-
parse
Returns a list ofNameValuePairparameters parsed from theapplication/x-www-form-urlencodedcontent.- Parameters:
s- input text.charset- parameter charset.- Returns:
- list of form parameters.
-
format
public static void format(StringBuilder buf, Iterable<? extends NameValuePair> params, Charset charset) Formats the list ofNameValuePairparameters into aapplication/x-www-form-urlencodedcontent.- Parameters:
buf- the content bufferparams- The from parameters.charset- The encoding to use.
-
format
Formats the list ofNameValuePairparameters into aapplication/x-www-form-urlencodedcontent string.- Parameters:
params- The from parameters.charset- The encoding to use.- Returns:
- content string
-