Skip to content

Commit 7947d52

Browse files
authored
Merge pull request #1056 from watzon/fix-double-slash-issue
(fix) double slash in path
2 parents a9256fa + 8864c0f commit 7947d52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/cli/lib/client.js.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const os = require('os');
2+
const join = require('path').join;
23
const https = require("https");
34
const { fetch, FormData, Agent } = require("undici");
45
const JSONbig = require("json-bigint")({ storeAsString: false });
@@ -99,7 +100,7 @@ class Client {
99100

100101
async call(method, path = "", headers = {}, params = {}, responseType = "json") {
101102
headers = {...this.headers, ...headers};
102-
const url = new URL(this.endpoint + path);
103+
const url = new URL(join(this.endpoint + path));
103104

104105
let body = undefined;
105106

0 commit comments

Comments
 (0)