Skip to content

Commit

Permalink
fix(rest-client): send user-agent instead of x-uc-user-agent head…
Browse files Browse the repository at this point in the history
…er (#447)
  • Loading branch information
nd0ut authored Nov 25, 2022
1 parent 9bb9073 commit 759768a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/rest-client/src/makeApiRequest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('apiRequest', () => {
expect(request.headers.get('Accept')).toBe(getAcceptHeader())
expect(request.headers.get('Content-Type')).toBe('application/json')
expect(request.headers.get('Authorization')).toBeTruthy()
expect(request.headers.get('X-UC-User-Agent')).toBe(
expect(request.headers.get('User-Agent')).toBe(
`UploadcareRestClient/${version}/${TEST_PUBLIC_KEY} (JavaScript)`
)
expect(request.url.toString()).toBe(
Expand Down
2 changes: 1 addition & 1 deletion packages/rest-client/src/makeApiRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export async function makeApiRequest(
body: requestBody,
headers: new Headers({
'Content-Type': 'application/json',
'X-UC-User-Agent': getUserAgent({
'User-Agent': getUserAgent({
publicKey: settings.authSchema.publicKey,
integration: settings.integration,
userAgent: settings.userAgent
Expand Down

0 comments on commit 759768a

Please sign in to comment.