Skip to content

Commit

Permalink
refactor(fetch): update HTTP headers content-type to use MimeTypes co…
Browse files Browse the repository at this point in the history
…nstant
  • Loading branch information
AliMD committed Oct 28, 2024
1 parent 386e25e commit c3862fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/fetch/src/core.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {delay} from '@alwatr/delay';
import {getGlobalThis} from '@alwatr/global-this';
import {HttpStatusCodes} from '@alwatr/http-primer';
import {HttpStatusCodes, MimeTypes} from '@alwatr/http-primer';
import {createLogger} from '@alwatr/logger';
import {packageTracer} from '@alwatr/package-tracer';
import {parseDuration} from '@alwatr/parse-duration';
Expand Down Expand Up @@ -61,7 +61,7 @@ export function processOptions_(options: FetchOptions): Required<FetchOptions> {

if (options.bodyJson !== undefined) {
options.body = JSON.stringify(options.bodyJson);
options.headers['content-type'] = 'application/json';
options.headers['content-type'] = MimeTypes.JSON;
}

if (options.bearerToken !== undefined) {
Expand Down

0 comments on commit c3862fc

Please sign in to comment.