Skip to content

Commit

Permalink
fix: allow user agent to over-write headers
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Jun 5, 2023
1 parent 7a4695c commit 340e2b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ export async function request({
...(isPost
? { "Content-Type": "application/json; charset=utf-8" }
: undefined),
...authHeader,
...headers,
...{
"User-Agent": user_agent ?? "alby-js-api",
"X-User-Agent": user_agent ?? "alby-js-api"
},
...authHeader,
...headers,
},
method,
body: isPost ? JSON.stringify(request_body) : undefined,
Expand Down

0 comments on commit 340e2b5

Please sign in to comment.