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

Method prepareRequest

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

Source from the content-addressed store, hash-verified

2382 this.password = password;
2383 }
2384 prepareRequest(options) {
2385 if (!options.headers) {
2386 throw Error('The request has no headers');
2387 }
2388 options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;
2389 }
2390 // This handler cannot handle 401
2391 canHandleAuthentication() {
2392 return false;

Callers 1

_prepareRequestMethod · 0.45

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected