» RPC API 范例 - DNS 接口 » ROA API 范例 - 知识库检索
阿里云 API 通用客户端
支持 RPC 风格和 ROA 风格(Resource-Oriented Architecture)签名。
ROA 风格 defaultContentType 与 contentType 的值默认为 "application/json"。
RPC 风格 defaultContentType 与 contentType 的值默认为
"application/x-www-form-urlencoded";
创建客户端
config 必须包含:
accessKeyId - 访问密钥 ID
accessKeySecret - 访问密钥
version - API 版本
RPC 风格还需指定:
action - RPC 风格使用此字段指定 API 名称
ROA 风格还需指定:
acsAction - API 名称
host - 服务端点(可选)