Example usage for org.apache.http.client.entity UrlEncodedFormEntityHacked UrlEncodedFormEntityHacked

List of usage examples for org.apache.http.client.entity UrlEncodedFormEntityHacked UrlEncodedFormEntityHacked

Introduction

In this page you can find the example usage for org.apache.http.client.entity UrlEncodedFormEntityHacked UrlEncodedFormEntityHacked.

Prototype

public UrlEncodedFormEntityHacked(final Iterable<? extends NameValuePair> parameters, final Charset charset) 

Source Link

Document

Constructs a new UrlEncodedFormEntity with the list of parameters in the specified encoding.

Usage

From source file:org.andstatus.app.net.http.HttpConnectionApacheCommon.java

private void fillSinglePartPost(HttpPost postMethod, JSONObject formParams)
        throws ConnectionException, UnsupportedEncodingException {
    List<NameValuePair> nvFormParams = HttpConnectionApacheCommon.jsonToNameValuePair(formParams);
    if (nvFormParams != null) {
        HttpEntity formEntity = new UrlEncodedFormEntityHacked(nvFormParams, HTTP.UTF_8);
        postMethod.setEntity(formEntity);
    }/*from w  w  w  .  j  ava2  s .c  o  m*/
}