File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ export class QueryStreamCommand extends RavenCommand<StreamResultResponse> {
3030 }
3131
3232 public createRequest ( node : ServerNode ) : HttpRequestParameters {
33- const format = this . _conventions . useJsonlStreaming ? 'jsonl' : 'json' ;
33+ const format = this . _conventions . useJsonlStreaming ? 'format= jsonl' : "" ;
3434
3535 return {
3636 method : "POST" ,
37- uri : `${ node . url } /databases/${ node . database } /streams/queries?format= ${ format } ` ,
37+ uri : `${ node . url } /databases/${ node . database } /streams/queries?${ format } ` ,
3838 body : writeIndexQuery ( this . _conventions , this . _indexQuery ) ,
3939 headers : this . _headers ( ) . typeAppJson ( ) . build ( )
4040 } ;
Original file line number Diff line number Diff line change @@ -49,9 +49,12 @@ export class StreamOperation {
4949 }
5050
5151 private _createRequestForIdPrefix ( idPrefix : string , opts : StartingWithOptions ) : StreamCommand {
52- const format = this . _session . conventions . useJsonlStreaming ? 'jsonl' : 'json' ;
52+ const sb = new StringBuilder ( `streams/docs?` ) ;
53+
54+ if ( this . _session . conventions . useJsonlStreaming ) {
55+ sb . append ( "format=jsonl&" ) ;
56+ }
5357
54- const sb = new StringBuilder ( `streams/docs?format=${ format } &` ) ;
5558 if ( idPrefix ) {
5659 sb . append ( "startsWith=" )
5760 . append ( encodeURIComponent ( idPrefix ) ) . append ( "&" ) ;
You can’t perform that action at this time.
0 commit comments