Skip to content

Commit

Permalink
fix: headers issue in post
Browse files Browse the repository at this point in the history
  • Loading branch information
rosmcmahon committed Jan 26, 2023
1 parent acd31e2 commit b82771a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export default class Api {
): Promise<ResponseWithData<T>> {
const headers = new Headers(config?.headers || {});

headers.append("content-type", "application/json");
if(!headers.get('content-type')?.includes('application/json')){
headers.append("content-type", "application/json");
}
headers.append("accept", "application/json, text/plain, */*");

return await this.request(endpoint, {
Expand Down

0 comments on commit b82771a

Please sign in to comment.