接口的使用
com.alibaba.nacos.common.http.Callback
使用Callback的程序包
-
com.alibaba.nacos.common.http.client中Callback的使用
修饰符和类型方法说明<T> voidNacosAsyncRestTemplate.delete(String url, Header header, Query query, Type responseType, Callback<T> callback)async http delete URL request params are expanded using the given queryQuery,<T> voidNacosAsyncRestTemplate.delete(String url, Header header, String body, Type responseType, Callback<T> callback)async http delete large request, when the parameter exceeds the URL limit, you can use this method to put the parameter into the body pass.<T> voidNacosAsyncRestTemplate.get(String url, Header header, Query query, Type responseType, Callback<T> callback)async http get URL request params are expanded using the given queryQuery.<T> voidNacosAsyncRestTemplate.getLarge(String url, Header header, Query query, Object body, Type responseType, Callback<T> callback)async get request, may be pulling a lot of data URL request params are expanded using the given queryQuery, More request parameters can be set via body.<T> voidNacosAsyncRestTemplate.post(String url, Header header, Query query, Object body, Type responseType, Callback<T> callback)async http post Create a new resource by POSTing the given object to the http request.<T> voidNacosAsyncRestTemplate.postForm(String url, Header header, Query query, Map<String,String> bodyValues, Type responseType, Callback<T> callback)async http post from Create a new resource by PUTting the given mapbodyValuesto http request, http header contentType default 'application/x-www-form-urlencoded;charset=utf-8'.<T> voidNacosAsyncRestTemplate.postForm(String url, Header header, Map<String,String> bodyValues, Type responseType, Callback<T> callback)async http post from Create a new resource by PUTting the given mapbodyValuesto http request, http header contentType default 'application/x-www-form-urlencoded;charset=utf-8'.<T> voidNacosAsyncRestTemplate.postJson(String url, Header header, Query query, String body, Type responseType, Callback<T> callback)async http post Json Create a new resource by POSTing the given object to the http request, http header contentType default 'application/json;charset=UTF-8'.<T> voidNacosAsyncRestTemplate.postJson(String url, Header header, String body, Type responseType, Callback<T> callback)async http post Json Create a new resource by POSTing the given object to the http request, http header contentType default 'application/json;charset=UTF-8'.<T> voidNacosAsyncRestTemplate.put(String url, Header header, Query query, Object body, Type responseType, Callback<T> callback)async http put Create a new resource by PUTting the given body to http request.<T> voidNacosAsyncRestTemplate.putForm(String url, Header header, Query query, Map<String,String> bodyValues, Type responseType, Callback<T> callback)async http put from Create a new resource by PUTting the given mapbodyValuesto http request, http header contentType default 'application/x-www-form-urlencoded;charset=utf-8'.<T> voidNacosAsyncRestTemplate.putForm(String url, Header header, Map<String,String> bodyValues, Type responseType, Callback<T> callback)async http put from Create a new resource by PUTting the given mapbodyValuesto http request, http header contentType default 'application/x-www-form-urlencoded;charset=utf-8'.<T> voidNacosAsyncRestTemplate.putJson(String url, Header header, Query query, String body, Type responseType, Callback<T> callback)async http put Json Create a new resource by PUTting the given body to http request, http header contentType default 'application/json;charset=UTF-8'.<T> voidNacosAsyncRestTemplate.putJson(String url, Header header, String body, Type responseType, Callback<T> callback)async http put Json Create a new resource by PUTting the given body to http request, http header contentType default 'application/json;charset=UTF-8'. -
com.alibaba.nacos.common.http.client.request中Callback的使用
修饰符和类型方法说明<T> voidAsyncHttpClientRequest.execute(URI uri, String httpMethod, RequestHttpEntity requestHttpEntity, ResponseHandler<T> responseHandler, Callback<T> callback)execute async http request.<T> voidDefaultAsyncHttpClientRequest.execute(URI uri, String httpMethod, RequestHttpEntity requestHttpEntity, ResponseHandler<T> responseHandler, Callback<T> callback)