Skip to content

Commit

Permalink
fix: skip setting empty headers
Browse files Browse the repository at this point in the history
  • Loading branch information
VisargD committed Feb 12, 2024
1 parent 6ac8408 commit 00d492a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/apis/createHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ export const createHeaders = (config: Record<string, any>): Record<string, strin
const headers: Record<string, string> = {}

for (let k in config) {
let v = config[k]
let v = config[k];

if (isEmpty(v)) continue;

// convert to snakecase
if (k.toLocaleLowerCase() === "authorization") {
headers[k.toLowerCase()] = v || ""
Expand Down

0 comments on commit 00d492a

Please sign in to comment.