| 构造器和说明 |
|---|
PutRequest(okhttp3.OkHttpClient okHttpClient,
String uri,
Map<String,String> headers,
Map<String,Object> params) |
| 限定符和类型 | 方法和说明 |
|---|---|
OkClient.BinaryRequest |
binary()
二进制请求
|
OkClient.PutRequest |
body(byte[] body)
设置请求体数据
|
OkClient.PutRequest |
body(InputStream body)
设置请求体数据
|
OkClient.PutRequest |
body(Object body)
设置请求体数据
自动识别对象类型,当允许转为JSON自动设置请求头为 application/json
|
OkClient.PutRequest |
body(String body)
设置请求体数据
|
OkClient.SendRequest |
complete()
完成构建
|
OkClient.PutRequest |
contentType(ContentTypeEnum contentType)
请求体类型
默认 application/json
|
OkClient.PutRequest |
contentType(String contentType)
请求体类型
默认 application/json
|
okhttp3.Response |
execute()
快捷执行请求
|
OkClient.MultipartFormDataRequest |
form()
表单请求
文件表单
|
OkClient.XWWWFormUrlencodedRequest |
xwwwFormUrlencoded()
表单请求
普通表单
|
public OkClient.PutRequest body(String body)
body - 数据public OkClient.PutRequest body(byte[] body)
body - 数据public OkClient.PutRequest body(InputStream body) throws IOException
body - 数据IOException - 异常public OkClient.PutRequest body(Object body)
body - 数据public OkClient.PutRequest contentType(ContentTypeEnum contentType)
contentType - 类型public OkClient.PutRequest contentType(String contentType)
contentType - 类型public OkClient.MultipartFormDataRequest form()
public OkClient.XWWWFormUrlencodedRequest xwwwFormUrlencoded()
public OkClient.BinaryRequest binary()
public OkClient.SendRequest complete()
public okhttp3.Response execute()
Copyright © 2024. All rights reserved.