public class CtyunRequest extends Object
| 限定符 | 构造器和说明 |
|---|---|
protected |
CtyunRequest(String method,
String urlPath,
Credential credential,
String endpointName) |
| 限定符和类型 | 方法和说明 |
|---|---|
CtyunRequest |
addHeader(String key,
String value)
添加请求头
|
CtyunRequest |
addHeaders(String key,
String... values)
添加请求头
|
CtyunRequest |
addParam(String key,
String value)
添加参数
|
CtyunRequest |
addParams(String key,
String... values)
添加参数
|
okhttp3.Request |
buildRequest(String host)
构建请求
|
String |
getEndpointName() |
CtyunRequest |
writeJson(Object data,
String contentType)
以json方式写入
|
CtyunRequest |
writeString(String data,
String contentType)
以String方式写入
|
protected CtyunRequest(String method, String urlPath, Credential credential, String endpointName)
public CtyunRequest addHeader(String key, String value)
key - 键value - 值public CtyunRequest addHeaders(String key, String... values)
key - 键values - 值public CtyunRequest addParam(String key, String value)
key - 键value - 值public CtyunRequest addParams(String key, String... values)
key - 键values - 值public CtyunRequest writeJson(Object data, String contentType) throws CtyunRequestException
data - 数据Exception - 异常CtyunRequestExceptionpublic CtyunRequest writeString(String data, String contentType) throws CtyunRequestException
data - 数据Exception - 异常CtyunRequestExceptionpublic okhttp3.Request buildRequest(String host)
host - 域名前缀public String getEndpointName()
Copyright © 2025. All rights reserved.