Skip to content

TencentCloud API Web SDK Common 版本,支持在 Web Standard 环境下请求腾讯云 API。

License

Notifications You must be signed in to change notification settings

tomtomyang/capi-web-sdk-common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

capi-web-sdk-common

概述

基于 tencentcloud-sdk-nodejs,封装 TencentCloud API Web SDK Common 版本,提供在 Web Standard 环境下的直接请求腾讯云 API 的能力。

构建

npm install

npm run build:esm
npm run build:cjs

使用

import { CapiClient } from 'capi-web-sdk-common';

const capiEndpoint = 'xxx.tencentcloudapi.com';
const capiVersion = 'xxxx-xx-xx';

const capiConfig = {
  region: 'ap-xxxxx',
  credential: {
    secretId: 'xxxxx',
    secretKey: 'xxxxx',
  },
  profile: {
    signMethod: 'TC3-HMAC-SHA256',
    language: 'en-US',
    httpProfile: {
      reqMethod: 'POST',
      reqTimeout: 30,
    },
  },
};

const capiClient = new CapiClient(capiEndpoint, capiVersion, capiConfig);

const response = await capiClient.request('xxxxx', {});

About

TencentCloud API Web SDK Common 版本,支持在 Web Standard 环境下请求腾讯云 API。

Resources

License

Stars

Watchers

Forks

Packages

No packages published