/** * Perform getUrl HTTP GET request and track the Android Context which initiated the request. * * @param context the Android Context which initiated the request. * @param url the URL to send the request to. * @param params additional GET parameters to send with the request. * @param responseHandler the response handler instance that should handle the response. * @return RequestHandle of future request process */ public RequestHandle get(Context context, String url, RequestParams params, ResponseHandlerInterface responseHandler) { return sendRequest(httpClient, httpContext, new HttpGet(getUrlWithQueryString(isUrlEncodingEnabled, url, params)), null, responseHandler, context); }
/** * Perform getUrl HTTP HEAD request and track the Android Context which initiated the request. * * @param context the Android Context which initiated the request. * @param url the URL to send the request to. * @param params additional HEAD parameters to send with the request. * @param responseHandler the response handler instance that should handle the response. * @return RequestHandle of future request process */ public RequestHandle head(Context context, String url, RequestParams params, ResponseHandlerInterface responseHandler) { return sendRequest(httpClient, httpContext, new HttpHead(getUrlWithQueryString(isUrlEncodingEnabled, url, params)), null, responseHandler, context); }
/** * Perform a HTTP GET request and track the Android Context which initiated the request. * @param context the Android Context which initiated the request. * @param url the URL to send the request to. * @param params additional GET parameters to send with the request. * @param responseHandler the response handler instance that should handle the response. */ public void get(Context context, String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { sendRequest(httpClient, httpContext, new HttpGet(getUrlWithQueryString(url, params)), null, responseHandler, context); }
/** * Perform getUrl HTTP DELETE request. * * @param context the Android Context which initiated the request. * @param url the URL to send the request to. * @param headers set one-time headers for this request * @param params additional DELETE parameters or files to send along with request * @param responseHandler the response handler instance that should handle the response. * @return RequestHandle of future request process */ public RequestHandle delete(Context context, String url, Header[] headers, RequestParams params, ResponseHandlerInterface responseHandler) { HttpDelete httpDelete = new HttpDelete(getUrlWithQueryString(isUrlEncodingEnabled, url, params)); if (headers != null) httpDelete.setHeaders(headers); return sendRequest(httpClient, httpContext, httpDelete, null, responseHandler, context); }
/** * Perform getUrl HTTP GET request and track the Android Context which initiated the request with * customized headers * * @param context Context to execute request against * @param url the URL to send the request to. * @param headers set headers only for this request * @param params additional GET parameters to send with the request. * @param responseHandler the response handler instance that should handle the response. * @return RequestHandle of future request process */ public RequestHandle get(Context context, String url, Header[] headers, RequestParams params, ResponseHandlerInterface responseHandler) { HttpUriRequest request = new HttpGet(getUrlWithQueryString(isUrlEncodingEnabled, url, params)); if (headers != null) request.setHeaders(headers); return sendRequest(httpClient, httpContext, request, null, responseHandler, context); }
/** * Perform a HTTP GET request and track the Android Context which initiated * the request with customized headers * * @param url the URL to send the request to. * @param headers set headers only for this request * @param params additional GET parameters to send with the request. * @param responseHandler the response handler instance that should handle * the response. */ public void get(Context context, String url, Header[] headers, RequestParams params, AsyncHttpResponseHandler responseHandler) { HttpUriRequest request = new HttpGet(getUrlWithQueryString(url, params)); if(headers != null) request.setHeaders(headers); sendRequest(httpClient, httpContext, request, null, responseHandler, context); }
/** * Perform getUrl HTTP HEAD request and track the Android Context which initiated the request with * customized headers * * @param context Context to execute request against * @param url the URL to send the request to. * @param headers set headers only for this request * @param params additional HEAD parameters to send with the request. * @param responseHandler the response handler instance that should handle the response. * @return RequestHandle of future request process */ public RequestHandle head(Context context, String url, Header[] headers, RequestParams params, ResponseHandlerInterface responseHandler) { HttpUriRequest request = new HttpHead(getUrlWithQueryString(isUrlEncodingEnabled, url, params)); if (headers != null) request.setHeaders(headers); return sendRequest(httpClient, httpContext, request, null, responseHandler, context); }