public interface HttpOperations
| 限定符和类型 | 方法和说明 |
|---|---|
default <T> T |
exchange(String url,
HttpMethod method,
BodyType bodyType,
ResponseType responseType,
Class<T> responseEntityClass,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行http请求
|
<T> T |
exchange(String url,
HttpMethod method,
BodyType bodyType,
ResponseType responseType,
Type responseEntityType,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行http请求
|
default <T> T |
exchange(String url,
HttpMethod method,
BodyType bodyType,
ResponseType responseType,
TypeReference<T> typeReference,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行http请求
|
default <T> T |
getForEntity(String url,
BodyType bodyType,
ResponseType responseType,
Class<T> responseEntityClass,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables)
自定义执行get请求并获取实体
|
default <T> T |
getForEntity(String url,
BodyType bodyType,
ResponseType responseType,
Type type,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables)
自定义执行get请求并获取实体
|
default <T> T |
getForEntity(String url,
BodyType bodyType,
ResponseType responseType,
TypeReference<T> typeReference,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables)
自定义执行get请求并获取实体
|
default <T> T |
getForJsonEntity(String url,
Class<T> responseEntityClass,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables)
自定义执行get请求并获取
json编码的实体 |
default <T> T |
getForJsonEntity(String url,
Type type,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables)
自定义执行get请求并获取
json编码的实体 |
default <T> T |
postForEntity(String url,
BodyType bodyType,
ResponseType responseType,
Class<T> responseEntityClass,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行post请求并获取实体
|
default <T> T |
postForEntity(String url,
BodyType bodyType,
ResponseType responseType,
Type type,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行post请求并获取实体
|
default <T> T |
postForEntity(String url,
BodyType bodyType,
ResponseType responseType,
TypeReference<T> typeReference,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行post请求并获取实体
|
default <T> T |
postForJsonEntity(String url,
Class<T> responseEntityClass,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行post请求并获取
json实体 |
default <T> T |
postForJsonEntity(String url,
Type type,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行post请求并获取
json实体 |
default <T> T getForJsonEntity(@Nonnull String url, @Nonnull Type type, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables)
json编码的实体url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/bartype - 返回实体类型httpHeaders - 请求headeruriVariables - 查询参数type指定的返回值default <T> T getForEntity(@Nonnull String url, @Nonnull BodyType bodyType, @Nonnull ResponseType responseType, @Nonnull Type type, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables)
url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barbodyType - 请求body类型responseType - response body类型type - 返回实体类型httpHeaders - 请求headeruriVariables - 查询参数type指定的返回值default <T> T getForJsonEntity(@Nonnull String url, @Nonnull Class<T> responseEntityClass, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables)
json编码的实体url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barresponseEntityClass - 返回实体类httpHeaders - 请求headeruriVariables - 查询参数type指定的返回值default <T> T getForEntity(@Nonnull String url, @Nonnull BodyType bodyType, @Nonnull ResponseType responseType, @Nonnull Class<T> responseEntityClass, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables)
url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barbodyType - 请求body类型responseType - response body类型responseEntityClass - 返回实体类httpHeaders - 请求headeruriVariables - 查询参数responseEntityClass指定的返回值default <T> T getForEntity(@Nonnull String url, @Nonnull BodyType bodyType, @Nonnull ResponseType responseType, @Nonnull TypeReference<T> typeReference, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables)
url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barbodyType - 请求body类型responseType - response body类型typeReference - 返回实体类型httpHeaders - 请求headeruriVariables - 查询参数typeReference指定的返回值default <T> T postForJsonEntity(@Nonnull String url, @Nonnull Type type, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables, @Nullable Object requestBody)
json实体url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/bartype - 返回实体类型httpHeaders - 请求headeruriVariables - 查询参数type指定的返回值default <T> T postForEntity(@Nonnull String url, @Nonnull BodyType bodyType, @Nonnull ResponseType responseType, @Nonnull Type type, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables, @Nullable Object requestBody)
url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barbodyType - 请求body类型responseType - response body类型type - 返回实体类型httpHeaders - 请求headeruriVariables - 查询参数type指定的返回值default <T> T postForJsonEntity(@Nonnull String url, @Nonnull Class<T> responseEntityClass, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables, @Nullable Object requestBody)
json实体url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barresponseEntityClass - 返回实体类httpHeaders - 请求headeruriVariables - 查询参数type指定的返回值default <T> T postForEntity(@Nonnull String url, @Nonnull BodyType bodyType, @Nonnull ResponseType responseType, @Nonnull Class<T> responseEntityClass, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables, @Nullable Object requestBody)
url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barbodyType - 请求body类型responseType - response body类型responseEntityClass - 返回实体类httpHeaders - 请求headeruriVariables - 查询参数responseEntityClass指定的返回值default <T> T postForEntity(@Nonnull String url, @Nonnull BodyType bodyType, @Nonnull ResponseType responseType, @Nonnull TypeReference<T> typeReference, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables, @Nullable Object requestBody)
url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barbodyType - 请求body类型responseType - response body类型typeReference - 返回实体类型httpHeaders - 请求headeruriVariables - 查询参数typeReference指定的返回值default <T> T exchange(@Nonnull String url, @Nonnull HttpMethod method, @Nonnull BodyType bodyType, @Nonnull ResponseType responseType, @Nonnull Class<T> responseEntityClass, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables, @Nullable Object requestBody)
url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barmethod - 请求方法。如GET, POST等bodyType - 请求body类型responseType - response body类型responseEntityClass - 返回实体类httpHeaders - 请求headeruriVariables - 查询参数requestBody - 请求bodyresponseEntityClass指定的返回值default <T> T exchange(@Nonnull String url, @Nonnull HttpMethod method, @Nonnull BodyType bodyType, @Nonnull ResponseType responseType, @Nonnull TypeReference<T> typeReference, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables, @Nullable Object requestBody)
url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barmethod - 请求方法。如GET, POST等bodyType - 请求body类型responseType - response body类型typeReference - 返回实体类型httpHeaders - 请求headeruriVariables - 查询参数requestBody - 请求bodytypeReference指定的返回值<T> T exchange(@Nonnull String url, @Nonnull HttpMethod method, @Nonnull BodyType bodyType, @Nonnull ResponseType responseType, @Nonnull Type responseEntityType, @Nullable Map<String,String> httpHeaders, @Nullable Map<String,Object> uriVariables, @Nullable Object requestBody)
url - 请求地址。如请求地址为https://example.com/foo/bar,则url应为/foo/barmethod - 请求方法。如GET, POST等bodyType - 请求body类型responseType - response body类型responseEntityType - 返回实体类型 TypeReferencehttpHeaders - 请求headeruriVariables - 查询参数requestBody - 请求bodyresponseEntityType指定的返回值Copyright © 2019. All rights reserved.