capi-web-sdk-common
v2.0.2
Published
TencentCloud API Web SDK Common Edition
Downloads
14
Maintainers
Readme
capi-web-sdk-common
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', {});