Angular - HTTP Client
Which of the following is the correct way to create HttpHeaders with a 'Content-Type' of 'application/json'?
new HttpHeaders({'Content-Type': 'application/json'}) is valid.set() returns a new instance, so chaining without assignment won't work. append() exists but is used differently. add() is invalid.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions