public class ApiDebugInfo extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ApiDebugInfo.MethodEnum
API的请求方法
|
| Constructor and Description |
|---|
ApiDebugInfo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAppKey()
调试请求使用的APP的key
|
String |
getAppSecret()
调试请求使用的APP的密钥
|
String |
getBody()
请求消息体,最长2097152字节
|
String |
getDomain()
API的访问域名,未提供时根据mode的取值使用如下默认值: - DEVELOPER API分组的子域名 - MARKET 云市场为API分组分配的域名 - CONSUMER API分组的子域名
|
Map<String,List<String>> |
getHeader()
头域参数,每个参数值为字符串数组,每个参数名称有如下约束: - 英文字母、数字、点、中连线组成 - 必须以英文字母开头,最长32字节 - 不支持以\"X-Apig-\"或\"X-Sdk-\"开头,不区分大小写 - 不支持取值为\"X-Stage\",不区分大小写 - mode为MARKET或CONSUMER时,不支持取值为\"X-Auth-Token\"和\"Authorization\",不区分大小写 > 头域名称在使用前会被规范化,如:\"x-MY-hEaDer\"会被规范化为\"X-My-Header\"
|
ApiDebugInfo.MethodEnum |
getMethod()
API的请求方法
|
String |
getMode()
调试模式 - DEVELOPER 调试尚未发布的API定义 - MARKET 调试云市场已购买的API - CONSUMER 调试指定运行环境下的API定义 > DEVELOPER模式,接口调用者必须是API拥有者。 MARKET模式,接口调用者必须是API购买者或拥有者。 CONSUMER模式,接口调用者必须有API在指定环境上的授权信息或是API拥有者。
|
String |
getPath()
API的请求路径,需以\"/\"开头,最大长度1024 > 须符合路径规范,百分号编码格式可被正确解码
|
Map<String,List<String>> |
getQuery()
查询参数,每个参数值为字符串数组,每个参数名称有如下约束: - 英文字母、数字、点、下划线、中连线组成 - 必须以英文字母开头,最长32字节 - 不支持以\"X-Apig-\"或\"X-Sdk-\"开头,不区分大小写 - 不支持取值为\"X-Stage\",不区分大小写
|
String |
getScheme()
API的请求协议 - HTTP - HTTPS
|
String |
getStage()
调试请求指定的运行环境,仅在mode为CONSUMER时有效,未提供时有如下默认值: - CONSUMER RELEASE
|
int |
hashCode() |
ApiDebugInfo |
putHeaderItem(String key,
List<String> headerItem) |
ApiDebugInfo |
putQueryItem(String key,
List<String> queryItem) |
void |
setAppKey(String appKey) |
void |
setAppSecret(String appSecret) |
void |
setBody(String body) |
void |
setDomain(String domain) |
void |
setHeader(Map<String,List<String>> header) |
void |
setMethod(ApiDebugInfo.MethodEnum method) |
void |
setMode(String mode) |
void |
setPath(String path) |
void |
setQuery(Map<String,List<String>> query) |
void |
setScheme(String scheme) |
void |
setStage(String stage) |
String |
toString() |
ApiDebugInfo |
withAppKey(String appKey) |
ApiDebugInfo |
withAppSecret(String appSecret) |
ApiDebugInfo |
withBody(String body) |
ApiDebugInfo |
withDomain(String domain) |
ApiDebugInfo |
withHeader(java.util.function.Consumer<Map<String,List<String>>> headerSetter) |
ApiDebugInfo |
withHeader(Map<String,List<String>> header) |
ApiDebugInfo |
withMethod(ApiDebugInfo.MethodEnum method) |
ApiDebugInfo |
withMode(String mode) |
ApiDebugInfo |
withPath(String path) |
ApiDebugInfo |
withQuery(java.util.function.Consumer<Map<String,List<String>>> querySetter) |
ApiDebugInfo |
withQuery(Map<String,List<String>> query) |
ApiDebugInfo |
withScheme(String scheme) |
ApiDebugInfo |
withStage(String stage) |
public ApiDebugInfo withBody(String body)
public String getBody()
public void setBody(String body)
public ApiDebugInfo withHeader(Map<String,List<String>> header)
public ApiDebugInfo putHeaderItem(String key, List<String> headerItem)
public ApiDebugInfo withHeader(java.util.function.Consumer<Map<String,List<String>>> headerSetter)
public Map<String,List<String>> getHeader()
public ApiDebugInfo withMethod(ApiDebugInfo.MethodEnum method)
public ApiDebugInfo.MethodEnum getMethod()
public void setMethod(ApiDebugInfo.MethodEnum method)
public ApiDebugInfo withMode(String mode)
public String getMode()
public void setMode(String mode)
public ApiDebugInfo withPath(String path)
public String getPath()
public void setPath(String path)
public ApiDebugInfo withQuery(Map<String,List<String>> query)
public ApiDebugInfo putQueryItem(String key, List<String> queryItem)
public ApiDebugInfo withQuery(java.util.function.Consumer<Map<String,List<String>>> querySetter)
public Map<String,List<String>> getQuery()
public ApiDebugInfo withScheme(String scheme)
public String getScheme()
public void setScheme(String scheme)
public ApiDebugInfo withAppKey(String appKey)
public String getAppKey()
public void setAppKey(String appKey)
public ApiDebugInfo withAppSecret(String appSecret)
public String getAppSecret()
public void setAppSecret(String appSecret)
public ApiDebugInfo withDomain(String domain)
public String getDomain()
public void setDomain(String domain)
public ApiDebugInfo withStage(String stage)
public String getStage()
public void setStage(String stage)
Copyright © 2022. All rights reserved.