@nightlylabs/dex-sdk 0.2.41 → 0.2.42
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.
- package/dist/index.cjs +8 -1
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1510,7 +1510,14 @@ var Client = class _Client {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
};
|
|
1512
1512
|
this.sendPostJson = async (message, endpoint) => {
|
|
1513
|
-
|
|
1513
|
+
let URL;
|
|
1514
|
+
if (endpoint.startsWith("http://") || endpoint.startsWith("https://")) {
|
|
1515
|
+
URL = endpoint;
|
|
1516
|
+
} else if (endpoint.startsWith("/") && this._proxyUrl) {
|
|
1517
|
+
URL = endpoint;
|
|
1518
|
+
} else {
|
|
1519
|
+
URL = this._serverUrl + endpoint;
|
|
1520
|
+
}
|
|
1514
1521
|
const headers = {
|
|
1515
1522
|
"Content-Type": "application/json"
|
|
1516
1523
|
};
|
package/dist/index.js
CHANGED
|
@@ -1460,7 +1460,14 @@ var Client = class _Client {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
};
|
|
1462
1462
|
this.sendPostJson = async (message, endpoint) => {
|
|
1463
|
-
|
|
1463
|
+
let URL;
|
|
1464
|
+
if (endpoint.startsWith("http://") || endpoint.startsWith("https://")) {
|
|
1465
|
+
URL = endpoint;
|
|
1466
|
+
} else if (endpoint.startsWith("/") && this._proxyUrl) {
|
|
1467
|
+
URL = endpoint;
|
|
1468
|
+
} else {
|
|
1469
|
+
URL = this._serverUrl + endpoint;
|
|
1470
|
+
}
|
|
1464
1471
|
const headers = {
|
|
1465
1472
|
"Content-Type": "application/json"
|
|
1466
1473
|
};
|