python ruby-programming-language Smalltalk Vue.js Knockoutjs TypeScript JavaScript, OOPs JavaScript Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 4 Angular 2 AngularJs 1.x NodeJs Perl Programming R Programming RequireJs Rust Programming Backbonejs closure programming language go-programming-language kotlin-programming-language
6

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

Hi there! Welcome to my blog. My name is Anil Singh. I'm a author of this blog. For more detail about me, kindly refer to this link..
My Blogs - http://code-sample.com and http://code-sample.xyz
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like
www.code-sample.com/. Powered by Blogger.
ASK Questions