Skip to content

Get Response Headers #1

@satyasutar

Description

@satyasutar

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions