我想复制一个REST响应成团块,但我不能做一些,因为blob()和arrayBuffer()尚未响应对象已经实施.Response Body是一个私有变量.
...
return this.http.get(url, {params: params, headers: headers})
.map(res => {
// can't access _body because it is private
// no method appears to exist to get to the _body without modification
new Blob([res._body], {type: res.headers.get('Content-Type')});
})
.catch(this.log);
...
Run Code Online (Sandbox Code Playgroud)
在实施这些方法之前,我是否可以使用解决方案?