You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like HttpClient has the option to observe the full response instead of content only. http .get<MyJsonData>('/data.json', {observe: 'response'}) .subscribe(resp => { // Here, resp is of type HttpResponse<MyJsonData>. // You can inspect its headers: console.log(resp.headers.get('X-Custom-Header')); // And access the body directly, which is typed as MyJsonData as requested. console.log(resp.body.someField); });
Is there an option to read the reponse header using angular-rest-client?
The text was updated successfully, but these errors were encountered:
Hello,
I have a query, rather than an issue.
Like HttpClient has the option to observe the full response instead of content only.
http .get<MyJsonData>('/data.json', {observe: 'response'}) .subscribe(resp => { // Here, resp is of type HttpResponse<MyJsonData>. // You can inspect its headers: console.log(resp.headers.get('X-Custom-Header')); // And access the body directly, which is typed as MyJsonData as requested. console.log(resp.body.someField); });
Is there an option to read the reponse header using angular-rest-client?
The text was updated successfully, but these errors were encountered: