From 0f4f975a06bdf7edb2b922c03d8de06952cbb8ff Mon Sep 17 00:00:00 2001 From: Daniel Cooper <5233036+danielcooperxyz@users.noreply.github.com> Date: Sun, 11 Feb 2024 19:04:43 +0000 Subject: [PATCH] Wrap headers with AxiosHeaders to prevent incorrect type being passed (#1248) * Set header type before calling transformer * Wrap the headers with AxiosHeader object every time --------- Co-authored-by: Daniel Cooper Co-authored-by: James Bourne --- src/interceptor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interceptor.ts b/src/interceptor.ts index 5ca59370..988faa7c 100644 --- a/src/interceptor.ts +++ b/src/interceptor.ts @@ -130,7 +130,8 @@ export const aws4Interceptor = ({ } const { host, pathname, search } = new URL(url); - const { data, headers, method } = config; + const { data, method } = config; + const headers = new AxiosHeaders(config.headers); const transformRequest = getTransformer(config);