MCPcopy Create free account
hub / github.com/nock/nock / basicAuth

Method basicAuth

lib/interceptor.js:467–471  ·  view source on GitHub ↗
({ user, pass = '' })

Source from the content-addressed store, hash-verified

465 }
466
467 basicAuth({ user, pass = '' }) {
468 const encoded = Buffer.from(`${user}:${pass}`).toString('base64')
469 this.matchHeader('authorization', `Basic ${encoded}`)
470 return this
471 }
472
473 /**
474 * Set query strings for the interceptor

Callers

nothing calls this directly

Calls 1

matchHeaderMethod · 0.95

Tested by

no test coverage detected