FileDocCategorySizeDatePackage
UrlEncodedFormEntity.javaAPI DocAndroid 1.5 API3180Wed May 06 22:41:10 BST 2009org.apache.http.client.entity

UrlEncodedFormEntity

public class UrlEncodedFormEntity extends StringEntity
An entity composed of a list of url-encoded pairs. This is typically useful while sending an HTTP POST request.

Fields Summary
Constructors Summary
public UrlEncodedFormEntity(List parameters, String encoding)
Constructs a new {@link UrlEncodedFormEntity} with the list of parameters in the specified encoding.

param
parameters list of name/value pairs
param
encoding encoding the name/value pairs be encoded with
throws
UnsupportedEncodingException if the encoding isn't supported

        super(URLEncodedUtils.format(parameters, encoding), 
            encoding);
        setContentType(URLEncodedUtils.CONTENT_TYPE);
    
public UrlEncodedFormEntity(List parameters)
Constructs a new {@link UrlEncodedFormEntity} with the list of parameters with the default encoding of {@link HTTP#DEFAULT_CONTENT_CHARSET}

param
parameters list of name/value pairs
throws
UnsupportedEncodingException if the default encoding isn't supported

        super(URLEncodedUtils.format(parameters, HTTP.DEFAULT_CONTENT_CHARSET), 
            HTTP.DEFAULT_CONTENT_CHARSET);
        setContentType(URLEncodedUtils.CONTENT_TYPE);
    
Methods Summary