How to send request with Digest authentication in angular ionic. i have tried the below code to request the server but it is not accepting the header and poping up the login screen. can anyone help me to find the right way to send digest authentication using ionic angular.
this.headers = new Headers();
this.headers.append('Content-Type', 'text/plain\r\n');
this.headers.append('Authorization', 'Digest Auth'
+ ('username=admin')
+ ('password=Admin')
+ ('realm=172fbc06f747cfecc88c461e')
+ ('nonce=94f6b93716')
+ ('qop=auth')
+ ('nc=0000008a')
+ ('default_device=default'));
var requestOptions = {
method: 'GET',
headers: this.headers,
redirect: 'follow'
};
return this.http.get('/command/analy/analyx.cgi?AppControl=' + data ,requestOptions)
.map(response => {
reslt = response.ok;
console.log("RESLT" + reslt)
return reslt;
})
Proxy
{
"name": "ionic4-angular7-crud",
"app_id": "",
"type": "ionic-angular",
"proxies": [
{
"path": "/command",
"proxyUrl": "http://192.168.10.109/command/"
}
],
"integrations": {
"cordova": {}
}
}
still in chrome i am getting CROS error. can anyone help me to resolve this issue
Tried disabling the chrome web security and it is not showing the CROS error message but it is forwarding to HTTPS even if I have directly call http.
chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security