Skip to content

Commit

Permalink
Wrap headers with AxiosHeaders to prevent incorrect type being passed (
Browse files Browse the repository at this point in the history
…#1248)

* Set header type before calling transformer

* Wrap the headers with AxiosHeader object every time

---------

Co-authored-by: Daniel Cooper <daniel.cooper@sony.com>
Co-authored-by: James Bourne <jamesmbourne@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 11, 2024
1 parent 4910cfb commit 0f4f975
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ export const aws4Interceptor = <D = any>({
}

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);

Expand Down

0 comments on commit 0f4f975

Please sign in to comment.