Skip to content

Commit

Permalink
Merge pull request #378 from Finch-API/u/eliseuvideira1/fix-bug-acces…
Browse files Browse the repository at this point in the history
…s-tokens-create-should-set-authorization-header-to-null

fix: fix bug access tokens create should set the authorization header to null - INTOP-93
  • Loading branch information
eliseuvideira1 authored May 25, 2024
2 parents 6b4c909 + a240b14 commit 8fc4121
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/resources/access-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ export class AccessTokens extends APIResource {
client_id: clientID,
client_secret: clientSecret,
};
return this._client.post('/auth/token', { body: bodyWithReplacements, ...options });
const headersWithReplacements = {
...options?.headers,
authorization: null,
};
return this._client.post('/auth/token', {
body: bodyWithReplacements,
...options,
headers: headersWithReplacements,
});
}
}

Expand Down

0 comments on commit 8fc4121

Please sign in to comment.