Skip to content

Commit

Permalink
The Content-Type entity-header field indicates the media type of the …
Browse files Browse the repository at this point in the history
…entity-body sent to the recipient. In our case it provides a 400 with sibil api
  • Loading branch information
bjulien committed Jan 22, 2024
1 parent 93d37ae commit 1a1b46e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/client/AbstractClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,13 @@ class AbstractClient<D extends MetadataDefinition> {
requestParams: RequestInit
): Promise<Response> {
let params = requestParams;
let baseHeaders: HeadersInit = {};

const baseHeaders: HeadersInit = {
'Content-Type': 'application/json',
};
if (params.method !== 'GET') {
baseHeaders = {
'Content-Type': 'application/json',
};
}

if (accessToken) {
baseHeaders.Authorization = `${this.sdk.config.authorizationType} ${accessToken}`;
Expand Down

0 comments on commit 1a1b46e

Please sign in to comment.