Wie kann ich auf den HTTP-Antworttext von Angular 2 zugreifen, ohne ihn in String oder JSON zu konvertieren?
Ich möchte eine REST-Antwort in einen Blob kopieren, kann aber keine Antwort senden, dablob()
undarrayBuffer()
sind noch nicht im Response Object implementiert. Der Antworttext ist eine private Variable.
...
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);
...
Gibt es eine Lösung, die ich verwenden kann, bis diese Methoden implementiert werden?