@tencent-sdk/capi
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -231,4 +231,3 @@ import crypto from 'crypto'; | ||
payload.Version = payload.Version || options.Version; | ||
payload.RequestClient = | ||
options.RequestClient || payload.RequestClient || 'tencent_sdk_capi'; | ||
payload.RequestClient = options.RequestClient; | ||
if (options.Token) { | ||
@@ -312,3 +311,3 @@ payload.Token = options.Token; | ||
protocol: 'https', | ||
baseHost: 'api.qcloud.com', | ||
baseHost: 'tencentcloudapi.com', | ||
ServiceType: '', | ||
@@ -326,2 +325,4 @@ SecretId: '', | ||
var options = Object.assign(this.options, opts); | ||
options.RequestClient = | ||
options.RequestClient || data.RequestClient || 'TENCENT_SDK_CAPI'; | ||
var Action = data.Action, Version = data.Version, restData = __rest(data, ["Action", "Version"]); | ||
@@ -352,14 +353,9 @@ var reqOption = { | ||
}; | ||
if (!reqOption.headers) { | ||
reqOption.headers = {}; | ||
} | ||
reqOption.headers['X-TC-RequestClient'] = options.RequestClient; | ||
if (this.options.Token) { | ||
if (!reqOption.headers) { | ||
reqOption.headers = {}; | ||
} | ||
reqOption.headers['X-TC-Token'] = this.options.Token; | ||
} | ||
if (opts.RequestClient) { | ||
if (!reqOption.headers) { | ||
reqOption.headers = {}; | ||
} | ||
reqOption.headers['X-TC-RequestClient'] = opts.RequestClient; | ||
} | ||
} | ||
@@ -366,0 +362,0 @@ else { |
@@ -237,4 +237,3 @@ (function (global, factory) { | ||
payload.Version = payload.Version || options.Version; | ||
payload.RequestClient = | ||
options.RequestClient || payload.RequestClient || 'tencent_sdk_capi'; | ||
payload.RequestClient = options.RequestClient; | ||
if (options.Token) { | ||
@@ -318,3 +317,3 @@ payload.Token = options.Token; | ||
protocol: 'https', | ||
baseHost: 'api.qcloud.com', | ||
baseHost: 'tencentcloudapi.com', | ||
ServiceType: '', | ||
@@ -332,2 +331,4 @@ SecretId: '', | ||
var options = Object.assign(this.options, opts); | ||
options.RequestClient = | ||
options.RequestClient || data.RequestClient || 'TENCENT_SDK_CAPI'; | ||
var Action = data.Action, Version = data.Version, restData = __rest(data, ["Action", "Version"]); | ||
@@ -358,14 +359,9 @@ var reqOption = { | ||
}; | ||
if (!reqOption.headers) { | ||
reqOption.headers = {}; | ||
} | ||
reqOption.headers['X-TC-RequestClient'] = options.RequestClient; | ||
if (this.options.Token) { | ||
if (!reqOption.headers) { | ||
reqOption.headers = {}; | ||
} | ||
reqOption.headers['X-TC-Token'] = this.options.Token; | ||
} | ||
if (opts.RequestClient) { | ||
if (!reqOption.headers) { | ||
reqOption.headers = {}; | ||
} | ||
reqOption.headers['X-TC-RequestClient'] = opts.RequestClient; | ||
} | ||
} | ||
@@ -372,0 +368,0 @@ else { |
{ | ||
"name": "@tencent-sdk/capi", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Tencent cloud api sdk", | ||
@@ -42,3 +42,3 @@ "main": "dist/index.js", | ||
"homepage": "https://github.com/yugasun/tencent-sdk#readme", | ||
"gitHead": "531fa480fba05ab9efbd0697ea0e1ef18472ddc9" | ||
"gitHead": "29e3b51abcf45d5546e34afa7d2062eb4a9c02a8" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37707
902