Search in sources :

Example 6 with Multimap

use of com.koushikdutta.async.http.Multimap in project AndroidAsync by koush.

the class AsyncHttpServerRequestImpl method get.

@Override
public String get(String name) {
    Multimap query = getQuery();
    String ret = query.getString(name);
    if (ret != null)
        return ret;
    AsyncHttpRequestBody body = getBody();
    Object bodyObject = body.get();
    if (bodyObject instanceof Multimap) {
        Multimap map = (Multimap) bodyObject;
        return map.getString(name);
    }
    return null;
}
Also used : Multimap(com.koushikdutta.async.http.Multimap) AsyncHttpRequestBody(com.koushikdutta.async.http.body.AsyncHttpRequestBody)

Aggregations

Multimap (com.koushikdutta.async.http.Multimap)6 UrlEncodedFormBody (com.koushikdutta.async.http.body.UrlEncodedFormBody)3 AsyncHttpRequestBody (com.koushikdutta.async.http.body.AsyncHttpRequestBody)2 AsyncHttpRequest (com.koushikdutta.async.http.AsyncHttpRequest)1 Ion (com.koushikdutta.ion.Ion)1 CookieMiddleware (com.koushikdutta.ion.cookie.CookieMiddleware)1 HttpCookie (java.net.HttpCookie)1 ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1