| 程序包 | 说明 |
|---|---|
| com.ifengxue.http.executor | |
| com.ifengxue.http.proxy |
| 限定符和类型 | 方法和说明 |
|---|---|
Request |
Request.addHeader(String name,
String value)
添加请求头
|
Request |
Request.addParameter(String name,
Object value)
添加请求参数
|
Request |
Request.Builder.build() |
Request |
Request.removeHeader(String name)
移除请求头
|
Request |
Request.removeParameter(String name)
移除请求参数
|
Request |
Request.replaceUrl(String newUrl)
替换请求URL
|
| 限定符和类型 | 方法和说明 |
|---|---|
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请求
|
| 限定符和类型 | 方法和说明 |
|---|---|
<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)
在请求之前执行
|
Copyright © 2019. All rights reserved.