File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- import { ContentType , StorageKey } from '~/libs/enums/enums.js' ;
1+ import { StorageKey } from '~/libs/enums/enums.js' ;
22import { getStringifiedQuery } from '~/libs/helpers/helpers.js' ;
33import { type ValueOf } from '~/libs/types/types.js' ;
44
@@ -27,7 +27,7 @@ class Http implements HttpApi {
2727 method = HttpMethod . GET ,
2828 payload = null ,
2929 hasAuth = true ,
30- contentType = ContentType . JSON ,
30+ contentType,
3131 query
3232 } = options ;
3333 const headers = this . #getHeaders( {
@@ -48,7 +48,7 @@ class Http implements HttpApi {
4848 #getHeaders( {
4949 hasAuth,
5050 contentType
51- } : Pick < HttpOptions , 'hasAuth' | 'contentType' > ) : Headers {
51+ } : Partial < Pick < HttpOptions , 'hasAuth' | 'contentType' > > ) : Headers {
5252 const headers = new Headers ( ) ;
5353
5454 if ( contentType ) {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ type HttpOptions = {
99 headers : Headers ;
1010 hasAuth : boolean ;
1111 query : Record < string , unknown > ;
12- contentType : ValueOf < typeof ContentType > ;
12+ contentType ? : ValueOf < typeof ContentType > | undefined ;
1313} ;
1414
1515export { type HttpOptions } ;
You can’t perform that action at this time.
0 commit comments