文档

网关 gateway

更新时间:
一键部署

本文介绍自定义设备面板SDK中网关请求的API调用。

背景信息

SDK的安装与API调用方法,请参考快速开始

云端API请求

request

请求参数

参数

参数类型

子参数

子参数类型

描述

是否必填

path

string

接口的路径

options

object

version

string

接口版本号

protocol

string

协议,推荐使用:https://。

authType

string

填入:iotAuth

data

object

接口参数

调用示例

gateway.request('/xx/xx/xx/get', {
  version: '1.0.0',
  protocol: 'https://',
  authType: 'iotAuth',
  data: {
    iotId:'xxx'
  },
}).then((res) => {
  console.log(res);
}).catch((err) => {
  console.warn(err);
});
  • 本页导读 (0)
文档反馈