Sets the Authorization header to Basic + . Additionally, allows using URLs with credentials in them.
Authorization
Basic
const user = "user"const pass = "pass"// Automatically sets the Authorization header to "Basic " + <base64 encoded credentials>wretch("...").addon(BasicAuthAddon).basicAuth(user, pass).get()// Allows using URLs with credentials in themwretch(`https://${user}:${pass}@...`).addon(BasicAuthAddon).get() Copy
const user = "user"const pass = "pass"// Automatically sets the Authorization header to "Basic " + <base64 encoded credentials>wretch("...").addon(BasicAuthAddon).basicAuth(user, pass).get()// Allows using URLs with credentials in themwretch(`https://${user}:${pass}@...`).addon(BasicAuthAddon).get()
Username to use for basic auth
Password to use for basic auth
Sets the.
Additionally, allows using URLs with credentials in them.
Authorizationheader toBasic+