I am consuming a web service which is hosted in our on premise Development environment.
I am able to get data if I directly hit the url from browse but at the same time if I consume the same data from my Angular 4 app.
It is giving me an error
Response for preflight has invalid http status code 401?
even if I added CORS plugin in my browser.
my headers are as follows.
headers: new HttpHeaders(
{
'Content-Type': 'application/json',
'Authorization' : 'Basic '+ btoa('username:password'),
'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'
}
)
As I am getting data from browser I copied all the headers from browsers dev console network tab and pasted it to my Angular App request header.
Please help.