We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98fe44e commit 0ff1873Copy full SHA for 0ff1873
src/HttpClient.ts
@@ -92,14 +92,15 @@ export default class ApiClient implements HttpClient {
92
const fetchRequestOptions: FetchRequestOptions = {
93
method,
94
headers: {
95
- Authorization: `ApiKey ${this.config.apiKey}`,
96
'User-Agent': `warrant-node/${version}`,
97
'Content-Type': "application/json"
98
},
99
};
100
101
if (requestOptions?.apiKey) {
102
fetchRequestOptions.headers['Authorization'] = `ApiKey ${requestOptions.apiKey}`;
+ } else if (this.config.apiKey) {
103
+ fetchRequestOptions.headers['Authorization'] = `ApiKey ${this.config.apiKey}`;
104
}
105
106
if (requestOptions?.baseUrl) {
0 commit comments