MCPcopy Create free account
hub / github.com/Azure/powershell / prepareRequest

Method prepareRequest

lib/index.js:2430–2435  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

2428 // currently implements pre-authorization
2429 // TODO: support preAuth = false where it hooks on 401
2430 prepareRequest(options) {
2431 if (!options.headers) {
2432 throw Error('The request has no headers');
2433 }
2434 options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;
2435 }
2436 // This handler cannot handle 401
2437 canHandleAuthentication() {
2438 return false;

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected