@veridia/node-sdk 1.0.11 → 1.0.12

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.
@@ -103,10 +103,10 @@ class VeridiaClient {
103
103
  async getUserSegments(identifierType, identifierId, noSegmentsOnError = true) {
104
104
  try {
105
105
  const path = `/segments/${identifierType}/${encodeURIComponent(identifierId)}`;
106
- const url = `${this.baseUrl}${path}`;
106
+ const url = new URL(`${this.baseUrl}${path}`);
107
107
  const req = {
108
- host: new URL(url).host,
109
- path,
108
+ host: url.host,
109
+ path: url.pathname,
110
110
  method: 'GET',
111
111
  service: 'segments',
112
112
  region: this.region,
@@ -115,7 +115,7 @@ class VeridiaClient {
115
115
  aws4.sign(req, this.options);
116
116
  const controller = new AbortController();
117
117
  const timeout = setTimeout(() => controller.abort(), this.timeoutMsGetUserSegments);
118
- const res = await (0, http_js_1.httpFetch)(url, {
118
+ const res = await (0, http_js_1.httpFetch)(url.toString(), {
119
119
  method: req.method,
120
120
  headers: req.headers,
121
121
  signal: controller.signal,
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.11";
1
+ export declare const SDK_VERSION = "1.0.12";
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = '1.0.11';
4
+ exports.SDK_VERSION = '1.0.12';
5
5
  //# sourceMappingURL=version.js.map
@@ -103,10 +103,10 @@ class VeridiaClient {
103
103
  async getUserSegments(identifierType, identifierId, noSegmentsOnError = true) {
104
104
  try {
105
105
  const path = `/segments/${identifierType}/${encodeURIComponent(identifierId)}`;
106
- const url = `${this.baseUrl}${path}`;
106
+ const url = new URL(`${this.baseUrl}${path}`);
107
107
  const req = {
108
- host: new URL(url).host,
109
- path,
108
+ host: url.host,
109
+ path: url.pathname,
110
110
  method: 'GET',
111
111
  service: 'segments',
112
112
  region: this.region,
@@ -115,7 +115,7 @@ class VeridiaClient {
115
115
  aws4.sign(req, this.options);
116
116
  const controller = new AbortController();
117
117
  const timeout = setTimeout(() => controller.abort(), this.timeoutMsGetUserSegments);
118
- const res = await (0, http_js_1.httpFetch)(url, {
118
+ const res = await (0, http_js_1.httpFetch)(url.toString(), {
119
119
  method: req.method,
120
120
  headers: req.headers,
121
121
  signal: controller.signal,
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.11";
1
+ export declare const SDK_VERSION = "1.0.12";
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = '1.0.11';
4
+ exports.SDK_VERSION = '1.0.12';
5
5
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veridia/node-sdk",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",