代理商请求供应商接口通用方法
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | common::idcsmart_api_curl |
| 所属业务 | 上下游 |
| 来源模块/系统 | 公共函数 |
功能说明
代理商请求供应商接口通用方法
调用示例
$api_id = 1;
$path = 'string';
$data = ['string'];
$timeout = 1752984000;
$request = 'string';
$response_type = 'string';
$result = idcsmart_api_curl($api_id, $path, $data, $timeout, $request, $response_type);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
api_id | int | 否 | — | — | 财务APIid |
path | string | 否 | — | — | 接口路径 |
data | array | 否 | — | — | 请求数据 |
timeout | int | 否 | — | — | 超时时间 |
request | string | 否 | — | — | 请求方式(GET,POST,PUT,DELETE) |
response_type | string | 否 | — | — | 响应类型:json,html |
返回值
未声明固定返回值。
正常返回
{}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |