Skip to content

Commit eca215d

Browse files
committed
[client] improve compatibility
1 parent d28bbf5 commit eca215d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class Client {
4747
if (password === "") {
4848
throw new Error("Password is required when using Basic Auth with login");
4949
}
50-
this.defaultHeaders["Authorization"] = `Basic ${Buffer.from(`${login}:${password}`).toString("base64")}`;
50+
this.defaultHeaders["Authorization"] = `Basic ${btoa(`${login}:${password}`)}`;
5151
}
5252
}
5353

0 commit comments

Comments
 (0)