So in angular currently I make a post like this which receives the body of the HttpResponse as the response. How can I get the response to be the Http Response so I can view the status code and the body of the response?
How I currently do it. I am sending an array of my own Model "ValidationStep" and recieving an Array of ValidationStep
saveListOfSteps(steps: ValidationStep[]): Promise<boolean> {
let httpHeaders = new HttpHeaders({
'Content-Type' : 'application/json',
});
let options = {
headers: httpHeaders
};
return this.http.post<ValidationStep[]>(this.saveListOfStepsUrl, steps, options)
.toPromise()
.then(response => response as ValidationStep[])
.catch(this.handleError);
}