ts-rest の client で Basic Authentication
const auth = Buffer.from("user:pass").toString("base64");
const client = initClient(contract, {
baseUrl: "http://localhost:3000",
baseHeaders: { "Authorization": `Basic ${auth}` },
});
const auth = Buffer.from("user:pass").toString("base64");
const client = initClient(contract, {
baseUrl: "http://localhost:3000",
baseHeaders: { "Authorization": `Basic ${auth}` },
});