typescript http get attach headers

Solutions on MaxInterview for typescript http get attach headers by the best coders in the world

showing results for - "typescript http get attach headers"
Lacie
17 Oct 2020
1const headerDict = {
2  'Content-Type': 'application/json',
3  'Accept': 'application/json',
4  'Access-Control-Allow-Headers': 'Content-Type',
5}
6
7const requestOptions = {                                                                                                                                                                                 
8  headers: new HttpHeaders(headerDict), 
9};
10
11return this.http.get(this.heroesUrl, requestOptions)
12