Окружающая среда: Angular 5.0.0

ужно отобразить миниатюру / изображение, которое приходит из запроса POST

Почтальон показывает вывод правильно

Я пытаюсь использовать то же самое в угловом компоненте, но не отображается. Консоль показать текст / бинарный.

HTML

<img src="{{turl}}" />

Component.ts

 turl : any

getThumbnail() : void {
this.azureblobService.getBlobThumbnail()
  .subscribe(
    (val) => {
      console.log("POST call - getThumbnail- successful value returned in body",
        val);
      this.turl = val; //<====== Set value here
    },
    response => {
      console.log("POST call - getThumbnail - in error", response);
    },
    () => {
      console.log("The POST - getThumbnail - observable is now completed.");
    });
 }

обслуживание

getBlobThumbnail() {
console.log("....AzureblobService.getBlobThumbnail()");
const headers = new HttpHeaders({
  'Content-Type': 'application/json',
  'Accept' : 'application/json',
  'Ocp-Apim-Subscription-Key' : 'xxxxxxx'
});

return this.http.post(this.thumbnailFetchUrl,
  JSON.stringify({
    responseType: "blob",
    "url": "http://xxxx.blob.core.windows.net/acsazurecontainer/Git-Logo-1788C.png",
  }), {headers: headers});
}

Цените любую помощь?

Ответы на вопрос(2)

Ваш ответ на вопрос