简体中文
Fx.erpdss
约 541 字大约 2 分钟
2026-01-09
摘要
本文档的概要说明如下: 本文档介绍 Fx.erpdss 的API定义、使用方式及相关说明。
1. 通过集成平台访问外部API
Fx.erpdss.proxyRequest(<String url>, <String method>, <Map headers>, <String body>, <String contentType>, <Boolean requestBodyNeedBase64Decode>, <Boolean responseBodyNeedBase64Encode>)
参数说明
入参格式
| 参数名称 | object | 描述 | 是否必填 |
|---|---|---|---|
| url | String | 访问的目标url,如果有,需要带上requestParam | 是 |
| method | String | 请求方法 | 是 |
| headers | Map | 请求的header,Map<String, List<String>> | 是 |
| body | String | 请求的body,可为空 | -- |
| contentType | String | 请求的content类型,默认为application/json | -- |
| requestBodyNeedBase64Decode | Boolean | 请求的body是否需要使用base64解码为byte[] | -- |
| responseBodyNeedBase64Encode | Boolean | 返回值的body是否需要使用base64编码为string | -- |
出参格式
| 参数名称 | object | 描述 |
|---|---|---|
| headers | Map | 请求的header,Map<String, List<String>> |
| code | Integer | 状态码 |
| message | String | 状态信息 |
| body | String | 数据体 |
出参样例
{
"headers": {
"date": [
"Thu, 31 Oct 2024 09:31:47 GMT"
]
},
"code": 200,
"message": "",
"body": "{\"id\":4559,\"uuid\":\"3f97cf57-6abd-46eb-a501-fc7f49aa2ab0\",\"hitokoto\":\"我们是学生,学生就要有学生的样子。\",\"type\":\"b\",\"from\":\"JOJO的奇妙冒险\",\"from_who\":null,\"creator\":\"你家炸了\",\"creator_uid\":3557,\"reviewer\":0,\"commit_from\":\"web\",\"created_at\":\"1564109075\",\"length\":17}"
}Groovy 举例
def (boolean error, Map data, String message) = Fx.biz.callAPI("Fx.erpdss.proxyRequest",
"https://www.google.com", "GET", [:], null
)
if (error) {
log.info("error: " + message)
} else {
log.info(data)
}负责人:谢嘉裕Ken
版本记录
| 版本 | 日期 | 变更内容 | 负责人 |
|---|---|---|---|
| v1.0 | 2026-05-19 | 初始版本 |
背景说明
本文档详细描述 Fx.erpdss 的相关接口功能和使用方法,帮助开发者快速集成相关能力。
适用场景
具体适用场景由实际业务需求决定,开发者可根据需要选择相应的接口进行集成。
前置条件
- 已接入纷享销客开放平台
- 已完成应用授权与配置
- 了解相关业务领域基础知识
操作步骤
具体操作步骤请参考各接口的详细说明。
注意事项
- 调用接口前请确保满足前置条件
- 注意接口调用频率限制
- 异常情况请参考错误码说明进行处理
兼容性说明:当前版本暂无可用的废弃或兼容性说明。
