how to set headers for post method in 10 code example
Example: typescript http get attach headers
const headerDict = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Access-Control-Allow-Headers': 'Content-Type',
}
const requestOptions = {
headers: new HttpHeaders(headerDict),
};
return this.http.get(this.heroesUrl, requestOptions)