@alicloud/pop-core
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -110,8 +110,9 @@ 'use strict'; | ||
request(method, uriPattern, query = {}, body = '', headers = {}) { | ||
const postBody = Buffer.from(body, 'utf8'); | ||
var postBody = null; | ||
var mixHeaders = Object.assign(this.buildHeaders(), headers); | ||
if (postBody.length) { | ||
const digest = kitx.md5(postBody, 'hex'); | ||
mixHeaders['content-md5'] = Buffer.from(digest, 'utf8').toString('base64'); | ||
if (body) { | ||
postBody = Buffer.from(body, 'utf8'); | ||
mixHeaders['content-md5'] = kitx.md5(postBody, 'base64'); | ||
mixHeaders['content-length'] = postBody.length; | ||
} | ||
@@ -118,0 +119,0 @@ |
{ | ||
"name": "@alicloud/pop-core", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "AliCloud POP SDK core", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
312
12907