Search in sources :

Example 6 with UrlEncodedFormBody

use of com.koushikdutta.async.http.body.UrlEncodedFormBody in project ion by koush.

the class IonRequestBuilder method setBodyParameter.

@Override
public IonRequestBuilder setBodyParameter(String name, String value) {
    if (bodyParameters == null) {
        bodyParameters = new Multimap();
        setBody(new UrlEncodedFormBody(bodyParameters));
    }
    if (value != null)
        bodyParameters.add(name, value);
    return this;
}
Also used : Multimap(com.koushikdutta.async.http.Multimap) UrlEncodedFormBody(com.koushikdutta.async.http.body.UrlEncodedFormBody)

Aggregations

UrlEncodedFormBody (com.koushikdutta.async.http.body.UrlEncodedFormBody)6 Multimap (com.koushikdutta.async.http.Multimap)3 NameValuePair (com.koushikdutta.async.http.NameValuePair)2 AsyncHttpServer (com.koushikdutta.async.http.server.AsyncHttpServer)2 AsyncHttpServerRequest (com.koushikdutta.async.http.server.AsyncHttpServerRequest)2 AsyncHttpServerResponse (com.koushikdutta.async.http.server.AsyncHttpServerResponse)2 HttpServerRequestCallback (com.koushikdutta.async.http.server.HttpServerRequestCallback)2 Bitmap (android.graphics.Bitmap)1 BitmapDrawable (android.graphics.drawable.BitmapDrawable)1 ImageView (android.widget.ImageView)1 AsyncServer (com.koushikdutta.async.AsyncServer)1 CompletedCallback (com.koushikdutta.async.callback.CompletedCallback)1 AsyncHttpClient (com.koushikdutta.async.http.AsyncHttpClient)1 AsyncHttpPost (com.koushikdutta.async.http.AsyncHttpPost)1 AsyncHttpResponse (com.koushikdutta.async.http.AsyncHttpResponse)1 BasicNameValuePair (com.koushikdutta.async.http.BasicNameValuePair)1 JSONObjectBody (com.koushikdutta.async.http.body.JSONObjectBody)1 MultipartFormDataBody (com.koushikdutta.async.http.body.MultipartFormDataBody)1 StringBody (com.koushikdutta.async.http.body.StringBody)1 File (java.io.File)1