Basic authentication middleware.
Basic
Attaches static Basic credentials to every request routed through the wrapped Fetch implementation.
Usage
import { createFetch } from "@metreeca/http";import { basic } from "@metreeca/http/basic";const client = createFetch(basic("user", "secret")); Copy
import { createFetch } from "@metreeca/http";import { basic } from "@metreeca/http/basic";const client = createFetch(basic("user", "secret"));
RFC 7617 - The 'Basic' HTTP Authentication Scheme
Creates a middleware authenticating requests with the Basic scheme.
Basicauthentication middleware.Attaches static
Basiccredentials to every request routed through the wrapped Fetch implementation.Usage
See
RFC 7617 - The 'Basic' HTTP Authentication Scheme