File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change
1
+ import type { AxiosWrapperOptions } from '@gravity-ui/axios-wrapper' ;
1
2
import { parseMultipart } from '@mjackson/multipart-parser' ;
2
3
import qs from 'qs' ;
3
4
@@ -28,6 +29,14 @@ export interface StreamQueryOptions {
28
29
}
29
30
30
31
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
+
31
40
async streamQuery < Action extends Actions > (
32
41
params : StreamQueryParams < Action > ,
33
42
options : StreamQueryOptions ,
@@ -64,6 +73,7 @@ export class StreamingAPI extends BaseYdbAPI {
64
73
method : 'POST' ,
65
74
signal : options . signal ,
66
75
headers,
76
+ credentials : this . withCredentials ? 'include' : undefined ,
67
77
body : JSON . stringify ( body ) ,
68
78
} ) ;
69
79
You can’t perform that action at this time.
0 commit comments