服务器向我发送了一个XML响应,但是我无法使用HttpClient angular 8得到它。
尝试将responseType设置为“blob”。已尝试使用HttpOptions。尝试使用标题Allow-Encoding、gzip等。
let url = "My server URL";
let body = "My xml content in string";
const headers = new HttpHeaders()
.set('Accept', 'text/xml')
.set('C
我正在使用PrimeNG数据表。我在Angular中使用httpClient从JSON占位符获取一些模拟数据。它在我的控制台中显示为一个对象数组,但是Visual Studio Code错误表明它是一个对象。错误显示“type Object is not assignable to any[]”。这里的问题是什么? table-layout.component.ts import { BrowserModule } from '@angular/platform-browser'
import { Component, OnInit, NgModule } from '