xjs-node 3.0.0-alpha.6 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -175,7 +175,7 @@ class HttpResolverContext {
175
175
  }
176
176
  else if (xjs_common_1.UType.isObject(payload)) {
177
177
  p = JSON.stringify(payload);
178
- params.headers["content-length"] = p.length;
178
+ params.headers["content-length"] = Buffer.byteLength(p);
179
179
  params.headers["content-type"] = "application/json";
180
180
  }
181
181
  return await this.reqHttps(u, params, p);
@@ -251,7 +251,7 @@ class HttpResolverContext {
251
251
  if (sc !== 2) {
252
252
  if (xjs_common_1.UType.isString(data) && data.trim())
253
253
  this.warn(data);
254
- reject(new xjs_common_1.XjsErr(s_errCode, `Https received a error status ${res.statusCode}`));
254
+ reject(new xjs_common_1.XjsErr(s_errCode, `Https received an error status ${res.statusCode}`));
255
255
  }
256
256
  else
257
257
  resolve({ payload: data, headers: res.headers });
@@ -6,7 +6,7 @@ const http_resolver_context_1 = require("./http-resolver-context");
6
6
  class HttpResolver {
7
7
  _op;
8
8
  _defaultClientOption = {
9
- cmv: 141,
9
+ cmv: 143,
10
10
  logger: console,
11
11
  logLevel: "warn"
12
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xjs-node",
3
- "version": "3.0.0-alpha.6",
3
+ "version": "3.0.0",
4
4
  "description": "library modules for nodejs + typescript that bundled general-purpose implementations.",
5
5
  "repository": {
6
6
  "type": "git",