(options: AzureKMSRequestOptions)
| 136 | * the default values for headers and the request url. |
| 137 | */ |
| 138 | export 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 |
no test coverage detected