This is a method in my Angular service.
public checkIn(checkInRequest: CheckInRequest): Observable<BookingRoomDetails> {
let _headers = new HttpHeaders();
_headers = _headers.append('Content-Type', 'application/json');
let options = {
headers: _headers,
withCredentials: true
}
const url = this._constantService.checkIn;
return this._httpClient.post<BookingRoomDetails>(url, checkInRequest, options);
}
When I log the header, it shows correctly. However, when checking the Request header in Chrome's Network tab, the custom header is not found.
Is there a way to successfully add custom headers? I am aware that HttpHeaders is immutable, but despite trying, it does not seem to work as expected.