/** * Perform getUrl HTTP PUT request, without any parameters. * * @param url the URL to send the request to. * @param responseHandler the response handler instance that should handle the response. * @return RequestHandle of future request process */ public RequestHandle put(String url, ResponseHandlerInterface responseHandler) { return put(null, url, null, responseHandler); }
/** * Perform a HTTP PUT request, without any parameters. * @param url the URL to send the request to. * @param responseHandler the response handler instance that should handle the response. */ public void put(String url, AsyncHttpResponseHandler responseHandler) { put(null, url, null, responseHandler); }
/** * Perform getUrl HTTP PUT request with parameters. * * @param url the URL to send the request to. * @param params additional PUT parameters or files to send with the request. * @param responseHandler the response handler instance that should handle the response. * @return RequestHandle of future request process */ public RequestHandle put(String url, RequestParams params, ResponseHandlerInterface responseHandler) { return put(null, url, params, responseHandler); }
/** * Perform a HTTP PUT request with parameters. * @param url the URL to send the request to. * @param params additional PUT parameters or files to send with the request. * @param responseHandler the response handler instance that should handle the response. */ public void put(String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { put(null, url, params, responseHandler); }
/** * Perform getUrl HTTP PUT 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 PUT parameters or files to send with the request. * @param responseHandler the response handler instance that should handle the response. * @return RequestHandle of future request process */ public RequestHandle put(Context context, String url, RequestParams params, ResponseHandlerInterface responseHandler) { return put(context, url, paramsToEntity(params, responseHandler), null, responseHandler); }
/** * Perform a HTTP PUT 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 PUT parameters or files to send with the request. * @param responseHandler the response handler instance that should handle the response. */ public void put(Context context, String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { put(context, url, paramsToEntity(params), null, responseHandler); }
/** * PUT /category. * @param context Context * @param name Category name * @param responseHandler Callback */ public static void add(Context context, String name, JsonHttpResponseHandler responseHandler) { init(context); RequestParams params = new RequestParams(); params.put("name", name); client.put(getApiUrl(context) + "/category", params, responseHandler); }
/** * PUT /subscription. * @param context Context * @param url URL to add * @param responseHandler Callback */ public static void add(Context context, String url, JsonHttpResponseHandler responseHandler) { init(context); RequestParams params = new RequestParams(); params.put("url", url); client.put(getApiUrl(context) + "/subscription", params, responseHandler); }
/** * PUT/DELETE /starred/id. * * @param context Context * @param id Article to star/unstar * @param star Star if true * @param responseHandler Callback */ public static void star(Context context, String id, boolean star, JsonHttpResponseHandler responseHandler) { init(context); if (star) { client.put(getApiUrl(context) + "/starred/" + id, responseHandler); } else { client.delete(getApiUrl(context) + "/starred/" + id, responseHandler); } }