What Are Angular HttpHeaders?

What Are HttpHeaders?
The Http Headers is immutable Map and each and every set() returns a new instance and applies the changes with lazy parsing.

An immutable set of Http headers, with lazy parsing.

HttpHeaders Constructor -
constructor(headers?: string | { [name: string]: string | string[];});

Imports HttpHeaders from -
import {HttpHeaders } from '@angular/common/http';

HttpHeaders class contains the list of methods -
1.      has() - Checks for existence of header by given name.
2.      get() - Returns the first header that matches given name.
3.      keys() - Returns the names of the headers
4.      getAll() - Returns list of header values for a given name.
5.      append() - Append headers by chaining.
6.      set() -  To set a custom header on the request for a given name
7.      delete() - To delete the header on the request for a given name

For more detail kindly 
refer the link.... 

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

What Are Angular HttpHeaders? What Are Angular HttpHeaders? Reviewed by Anil Singh on 12:11 AM Rating: (5)
www.code-sample.com/. Powered by Blogger.