0
Kann man mit dem neuen HttpClient in Angular (4.3+) auch eine Typüberprüfung auf POST (und Art anderer Anfragen) durchführen? Die offizielle Dokumentation (https://angular.io/guide/http#typechecking-the-response) erwähnt nur GET-Anfragen:Angular HttpClient Tychecking Beitrag Request's Repsonse
interface ItemsResponse {
results: string[];
}
...
http.get<ItemsResponse>('/api/items').subscribe(data => {
// data is now an instance of type ItemsResponse, so you can do this:
this.results = data.results;
});
Ist es die gleiche Art und Weise für andere Art von Anfragen arbeiten?