MCPcopy
hub / github.com/mongodb/node-mongodb-native / prepareRequest

Function prepareRequest

src/client-side-encryption/providers/azure.ts:138–146  ·  view source on GitHub ↗
(options: AzureKMSRequestOptions)

Source from the content-addressed store, hash-verified

136 * the default values for headers and the request url.
137 */
138export function prepareRequest(options: AzureKMSRequestOptions): {
139 headers: Document;
140 url: URL;
141} {
142 const url = new URL(options.url?.toString() ?? AZURE_BASE_URL);
143 addAzureParams(url, 'https://vault.azure.net');
144 const headers = { ...options.headers, 'Content-Type': 'application/json', Metadata: true };
145 return { headers, url };
146}
147
148/**
149 * @internal

Callers 1

fetchAzureKMSTokenFunction · 0.85

Calls 2

addAzureParamsFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected