我正在尝试从Web服务获取响应。我打电话给我的函数
在Web服务中,我做了一些工作,最后得到了一个readablestream
对象的response.body。我返回了这个对象,但是在应用程序的另一部分中,我无法使这个带有值的对象始终是未定义的。
这是我的代码:
pressReceiptHandler: function(pressReceipt) {
this.pressReceiptObjectAsync({
booking1: this.booking1,
arrival
}).then(response => this.pressReceipt(response));
// response is always undefined but in web
// service in the is readablestream
// object before the return
},