You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should ad a parameter to responseStreamStart specifying the kind of input or the start/end stream strings.
The main goal is to make something like this possible:
MyApiModule.prototype.testPublic=function(request,response){varself=this;// start/stop stringsself.emit("responseStreamStart",request,response,200,null,['{','}']);// or json type defined in apimodule.jsself.emit("responseStreamStart",request,response,200,null,ApiModule.responseStreamTypes.OBJECT);varmyAsyncEventEmitter=newSomethingAsync();myAsyncEventEmitter.on('data',function(err,item){self.emit("responseStreamData",request,response,{key: randomKey(),value: item},false);}myAsyncEventEmitter.on('end',function(err,item){// last object (avoiding trailing commas)self.emit("responseStreamData",request,response,{key: randomKey(),item: item},true);self.emit("responseStreamEnd",request,response);}}
We should ad a parameter to
responseStreamStart
specifying the kind of input or the start/end stream strings.The main goal is to make something like this possible:
this should produce a response like this
The text was updated successfully, but these errors were encountered: