Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
st-vi committed Oct 20, 2023
1 parent acf957c commit ccfc408
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion WebSocketClient/UVLPlayground/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const languageId = 'python';
let languageClient: MonacoLanguageClient;

const createUrl = (hostname: string, port: number, path: string, searchParams: Record<string, any> = {}, secure: boolean = location.protocol === 'https:'): string => {
console.log(secure);
const protocol = secure ? 'wss' : 'ws';
console.log(protocol);
const url = new URL(`${protocol}://${hostname}:${port}${path}`);
console.log(url);
console.log(location.protocol);
Expand All @@ -43,7 +45,7 @@ const createUrl = (hostname: string, port: number, path: string, searchParams: R
url.searchParams.set(key, value);
}
}

console.log(url.toString());
return url.toString();
};

Expand Down

0 comments on commit ccfc408

Please sign in to comment.