-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c87d69a
commit 7cf6eb8
Showing
7 changed files
with
28 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { create as default } from './modules/core'; | ||
export type { DefaultRequestConfig } from './types'; | ||
export type { RequestConfig } from './types'; |
6 changes: 4 additions & 2 deletions
6
packages/@ackee/antonio-core/src/modules/core/config/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import Headers from 'fetch-headers'; | ||
import loglevel from 'loglevel'; | ||
|
||
import { DefaultRequestConfig, GeneralConfig } from '../../../types'; | ||
import { RequestConfig, GeneralConfig } from '../../../types'; | ||
|
||
export const defaultRequestConfig: DefaultRequestConfig = { | ||
export const defaultRequestConfig: Required<Pick<RequestConfig, 'responseType' | 'headers'>> = { | ||
responseType: 'json', | ||
headers: new Headers(), | ||
}; | ||
|
||
export type DefaultRequestConfig = RequestConfig & typeof defaultRequestConfig; | ||
|
||
export const defaultGeneralConfig: GeneralConfig = { | ||
logger: loglevel, | ||
}; |
6 changes: 3 additions & 3 deletions
6
packages/@ackee/antonio-core/src/modules/core/models/HttpClient.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters