Progressive Web Application Development by Example: Develop fast, reliable, and engaging user experiences for the web by Chris Love
Author:Chris Love [Love, Chris]
Language: eng
Format: epub, pdf
Tags: COM060090 - COMPUTERS / Internet / Application Development, COM060180 - COMPUTERS / Web / Web Services and APIs, COM051260 - COMPUTERS / Programming Languages / JavaScript
Publisher: Packt Publishing
Published: 2018-07-23T23:00:00+00:00
Accessing Header values
The get method returns a specific headers value:
Var cacheHeader = myHeaders.get('Cache-Control'); //returns 'private, max-age=3600, s-max-age=300'
The entries method returns an iterator you can use to loop through all the headers. Each entry is a simple array, with the first entry being the header key name and the second member being the value:
// Display the key/value pairs for (var header of myHeaders.entries()) { console.log(header[0]+ ': '+ header[1]); }
The keys method also provides an iterator, but only returns a list of header names:
// Display the keys for(var key of myHeaders.keys()) { console.log(key); }
Conversely, you can get a list of values from the values method. The problem with this method is that the values are not directly correlated to their keys:
// Display the values for (var value of myHeaders.values()) { console.log(value); }
You can check if a header exists by calling the has method:
myHeaders.has(name);
A header can be removed using the delete method:
myHeaders.delete(name);
Download
Progressive Web Application Development by Example: Develop fast, reliable, and engaging user experiences for the web by Chris Love.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12708)
Hello! Python by Anthony Briggs(10010)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9879)
The Mikado Method by Ola Ellnestam Daniel Brolund(9877)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(9842)
Dependency Injection in .NET by Mark Seemann(9422)
Hit Refresh by Satya Nadella(8875)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8391)
The Kubernetes Operator Framework Book by Michael Dame(8019)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7843)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7809)
Exploring Deepfakes by Bryan Lyon and Matt Tora(7806)
Grails in Action by Glen Smith Peter Ledbrook(7776)
Practical Computer Architecture with Python and ARM by Alan Clements(7757)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7723)
Robo-Advisor with Python by Aki Ranin(7704)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7657)
Building Low Latency Applications with C++ by Sourav Ghosh(7608)
Svelte with Test-Driven Development by Daniel Irvine(7592)
