GetRequest, PostRequest, PutRequestpublic abstract class OkHttpRequest extends Object
| 修饰符和类型 | 字段 | 说明 |
|---|---|---|
protected String |
body |
|
protected okhttp3.Request.Builder |
builder |
|
protected Map<String,String> |
encodedParams |
|
protected List<PostRequest.FileInfo> |
fileInfos |
|
protected Map<String,String> |
headers |
|
protected int |
id |
|
protected okhttp3.MultipartBody |
multipartBody |
|
protected Map<String,String> |
params |
|
protected String |
url |
| 限定符 | 构造器 | 说明 |
|---|---|---|
protected |
OkHttpRequest(String url,
Object tag,
Map<String,String> params,
Map<String,String> headers,
List<PostRequest.FileInfo> fileInfos,
String body,
okhttp3.MultipartBody multipartBody,
int id) |
|
protected |
OkHttpRequest(String url,
Object tag,
Map<String,String> params,
Map<String,String> encodedParams,
Map<String,String> headers,
List<PostRequest.FileInfo> fileInfos,
String body,
okhttp3.MultipartBody multipartBody,
int id) |
| 修饰符和类型 | 方法 | 说明 |
|---|---|---|
protected void |
appendHeaders() |
|
RequestCall |
build(okhttp3.OkHttpClient okHttpClient) |
|
protected abstract okhttp3.Request |
buildRequest(okhttp3.RequestBody requestBody) |
|
protected abstract okhttp3.RequestBody |
buildRequestBody() |
|
okhttp3.Request |
createRequest(Callback callback) |
|
static okhttp3.RequestBody |
createRequestBody(okhttp3.MediaType contentType,
InputStream is) |
Returns a new request body that transmits the content of
file. |
int |
getId() |
protected int id
protected String url
protected String body
protected List<PostRequest.FileInfo> fileInfos
protected okhttp3.MultipartBody multipartBody
protected okhttp3.Request.Builder builder
protected OkHttpRequest(String url, Object tag, Map<String,String> params, Map<String,String> headers, List<PostRequest.FileInfo> fileInfos, String body, okhttp3.MultipartBody multipartBody, int id)
protected abstract okhttp3.RequestBody buildRequestBody()
protected abstract okhttp3.Request buildRequest(okhttp3.RequestBody requestBody)
public RequestCall build(okhttp3.OkHttpClient okHttpClient)
public okhttp3.Request createRequest(Callback callback)
protected void appendHeaders()
public int getId()
public static okhttp3.RequestBody createRequestBody(okhttp3.MediaType contentType,
InputStream is)
file.Copyright © 2019. All rights reserved.