@alicloud/pop-core
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -88,10 +88,17 @@ 'use strict'; | ||
this.verbose = verbose === true; | ||
var httpModule = this.endpoint.startsWith('https://') ? require('https') : require('http'); | ||
this.keepAliveAgent = new httpModule.Agent({ | ||
keepAlive: true, | ||
keepAliveMsecs: 3000 | ||
}); | ||
} | ||
request(action, params) { | ||
params || (params = {}); | ||
request(action, params = {}, opts = {}) { | ||
// 1. compose params | ||
action = firstLetterUpper(action); | ||
params = formatParams(params); | ||
// format params until formatParams is false | ||
if (opts.formatParams !== false) { | ||
params = formatParams(params); | ||
} | ||
var defaults = this._buildParams(); | ||
@@ -118,3 +125,7 @@ params = Object.assign({Action: action}, defaults, params); | ||
return httpx.request(url).then((response) => { | ||
if (opts && !opts.agent) { | ||
opts.agent = this.keepAliveAgent; | ||
} | ||
return httpx.request(url, opts).then((response) => { | ||
entry.request = response.req; | ||
@@ -121,0 +132,0 @@ entry.response = response; |
{ | ||
"name": "@alicloud/pop-core", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "AliCloud POP SDK core", | ||
@@ -34,3 +34,14 @@ "main": "lib/core.js", | ||
"mocha": "^3.2.0" | ||
} | ||
}, | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/aliyun/openapi-core-nodejs-sdk.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/aliyun/openapi-core-nodejs-sdk/issues" | ||
}, | ||
"homepage": "https://github.com/aliyun/openapi-core-nodejs-sdk#readme" | ||
} |
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
Network access
Supply chain riskThis module accesses the network.
Found 2 instances 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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
7481
177
0
0
0
3