Skip to content

Commit 225888f

Browse files
chore: use AxiosHeaders for strict type checking
1 parent d1eb338 commit 225888f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/base/RequestClient.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { HttpMethod } from "../interfaces";
22
import axios, {
3-
AxiosInstance,
4-
AxiosRequestConfig,
5-
AxiosResponse,
6-
InternalAxiosRequestConfig,
3+
AxiosHeaders,
4+
AxiosInstance,
5+
AxiosRequestConfig,
6+
AxiosResponse,
7+
InternalAxiosRequestConfig,
78
} from "axios";
89
import * as fs from "fs";
910
import HttpsProxyAgent from "https-proxy-agent";
@@ -297,7 +298,7 @@ class RequestClient {
297298
*/
298299
validationInterceptor(validationClient: ValidationClientOptions) {
299300
return function (config: InternalAxiosRequestConfig) {
300-
config.headers = config.headers || {};
301+
config.headers = config.headers || new AxiosHeaders();
301302
try {
302303
config.headers["Twilio-Client-Validation"] = new ValidationToken(
303304
validationClient

0 commit comments

Comments
 (0)