Skip to content

Commit 7397f5f

Browse files
authored
feat(api): use custom axios defaults (#2616)
1 parent d2bdf9f commit 7397f5f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/services/api/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ export class YdbEmbeddedAPI {
3131
webVersion = false,
3232
withCredentials = false,
3333
csrfTokenGetter = () => undefined,
34+
defaults = {},
3435
}: {
3536
webVersion?: boolean;
3637
withCredentials?: boolean;
3738
csrfTokenGetter?: () => string | undefined;
39+
defaults?: AxiosRequestConfig;
3840
} = {}) {
39-
const config: AxiosRequestConfig = {withCredentials};
41+
const config: AxiosRequestConfig = {withCredentials, ...defaults};
4042

4143
this.auth = new AuthAPI({config});
4244
if (webVersion) {

0 commit comments

Comments
 (0)