请扫码查看示例
 # sendMCloudRequest ^6.8
发送智慧云网络请求:此接口固定 Post 到智慧云 https 地址及端口
# 请求参数
| Prop | Type | Default | Comment | 
|---|---|---|---|
| version | String | N/A | 可选项)请求服务的版本,若没有传此项参数, 则使用默认值:"v1" | 
| url | String | N/A | 请求接口路径 | 
| params | Object | N/A | 请求参数 | 
# 引入接口模块
import bridge from '@minix-iot/etsbridge-sdk'
1
# 接口调用示例
const params = {
  version: 'xxx',
  url: 'xxx',
  params: {},
}
bridge
  .sendMCloudRequest(params)
  .then((res) => {
    console.log(res)
  })
  .catch((err) => {
    console.log(err)
  })
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# 返回参数
- 成功时返回
| Prop | Type | Default | Description | 
|---|---|---|---|
| errorCode | Number | N/A | 0 正常回调 -1 请求超时 | 
| data | Object | N/A | 返回结果 | 
- 失败时返回