| 程序包 | 说明 |
|---|---|
| com.ifengxue.http.annotation | |
| com.ifengxue.http.contract | |
| com.ifengxue.http.executor | |
| com.ifengxue.http.proxy |
| 限定符和类型 | 方法和说明 |
|---|---|
static BodyType |
BodyType.valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static BodyType[] |
BodyType.values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
| 限定符和类型 | 方法和说明 |
|---|---|
default <T> T |
HttpOperations.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 |
HttpOperations.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 |
HttpOperations.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 |
HttpOperations.getForEntity(String url,
BodyType bodyType,
ResponseType responseType,
Class<T> responseEntityClass,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables)
自定义执行get请求并获取实体
|
default <T> T |
HttpOperations.getForEntity(String url,
BodyType bodyType,
ResponseType responseType,
Type type,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables)
自定义执行get请求并获取实体
|
default <T> T |
HttpOperations.getForEntity(String url,
BodyType bodyType,
ResponseType responseType,
TypeReference<T> typeReference,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables)
自定义执行get请求并获取实体
|
default <T> T |
HttpOperations.postForEntity(String url,
BodyType bodyType,
ResponseType responseType,
Class<T> responseEntityClass,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行post请求并获取实体
|
default <T> T |
HttpOperations.postForEntity(String url,
BodyType bodyType,
ResponseType responseType,
Type type,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行post请求并获取实体
|
default <T> T |
HttpOperations.postForEntity(String url,
BodyType bodyType,
ResponseType responseType,
TypeReference<T> typeReference,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody)
自定义执行post请求并获取实体
|
| 限定符和类型 | 方法和说明 |
|---|---|
HttpResponse |
FormDataHttpExecutor.execute(Request request,
BodyType bodyType,
ResponseType responseType) |
HttpResponse |
UrlEncodedHttpExecutor.execute(Request request,
BodyType bodyType,
ResponseType responseType) |
HttpResponse |
JsonHttpExecutor.execute(Request request,
BodyType bodyType,
ResponseType responseType) |
HttpResponse |
XmlHttpExecutor.execute(Request request,
BodyType bodyType,
ResponseType responseType) |
HttpResponse |
HttpExecutor.execute(Request request,
BodyType bodyType,
ResponseType responseType)
执行http请求
|
HttpExecutor |
HttpExecutorFactory.getHttpExecutor(BodyType bodyType)
获取http executor,如果没设置
HttpExecutorFactory.httpClient,则自动创建一个http client |
HttpExecutor |
HttpExecutorFactory.getHttpExecutor(BodyType bodyType,
org.apache.http.impl.client.CloseableHttpClient httpClient)
获取http executor
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
InterceptorAdaptor.beforeParse(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpResponse httpResponse,
HttpParser httpParser) |
<T> T |
LoggingInterceptor.beforeParse(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpResponse httpResponse,
HttpParser httpParser) |
<T> T |
Interceptor.beforeParse(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpResponse httpResponse,
HttpParser httpParser)
在请求之后,解析之前执行
|
<T> T |
InterceptorAdaptor.beforeRequest(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpExecutor executor) |
<T> T |
BasicAuthInterceptor.beforeRequest(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpExecutor executor) |
<T> T |
LoggingInterceptor.beforeRequest(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpExecutor executor) |
<T> T |
Interceptor.beforeRequest(Method method,
Request request,
BodyType bodyType,
ResponseType responseType,
HttpExecutor executor)
在请求之前执行
|
<T> T |
GenericHttpInvoker.exchange(String url,
HttpMethod method,
BodyType bodyType,
ResponseType responseType,
Type responseEntityType,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody) |
<T> T |
RequestInvoker.exchange(String url,
HttpMethod method,
BodyType bodyType,
ResponseType responseType,
Type responseEntityType,
Map<String,String> httpHeaders,
Map<String,Object> uriVariables,
Object requestBody) |
Copyright © 2019. All rights reserved.