Skip to content

Commit 35386a2

Browse files
committed
fix: better code
1 parent 5064078 commit 35386a2

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/services/api/streaming.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type {AxiosWrapperOptions} from '@gravity-ui/axios-wrapper';
21
import {parseMultipart} from '@mjackson/multipart-parser';
32
import qs from 'qs';
43

@@ -29,14 +28,6 @@ export interface StreamQueryOptions {
2928
}
3029

3130
export class StreamingAPI extends BaseYdbAPI {
32-
withCredentials?: boolean;
33-
34-
constructor(options: AxiosWrapperOptions) {
35-
super(options);
36-
37-
this.withCredentials = options.config?.withCredentials;
38-
}
39-
4031
async streamQuery<Action extends Actions>(
4132
params: StreamQueryParams<Action>,
4233
options: StreamQueryOptions,
@@ -73,7 +64,7 @@ export class StreamingAPI extends BaseYdbAPI {
7364
method: 'POST',
7465
signal: options.signal,
7566
headers,
76-
credentials: this.withCredentials ? 'include' : 'same-origin',
67+
credentials: this._axios.defaults.withCredentials ? 'include' : 'same-origin',
7768
body: JSON.stringify(body),
7869
});
7970

0 commit comments

Comments
 (0)