2.0.2 • Published 9 months ago

capi-web-sdk-common v2.0.2

Weekly downloads
-
License
Apache
Repository
github
Last release
9 months ago

capi-web-sdk-common

English | 简体中文

Overview

Based on tencentcloud-sdk-nodejs, this package encapsulates the TencentCloud API Web SDK Common version, providing the ability to directly request Tencent Cloud APIs in a Web Standard environment.

Installation

npm i capi-web-sdk-common

Usage

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', {});
2.0.2

9 months ago

2.0.1

10 months ago

2.0.0

10 months ago