I need to send authorization request using basic auth. I have successfully implemented this using jquery. However when I get 401 error basic auth browser popup is opened and
If you're using an IIS Server, you could setup IIS URL Rewriting (v2) to rewrite the WWW-Authentication header to None on the requested URL.
WWW-Authentication
None
Guide here.
The value you want to change is response_www_authenticate.
response_www_authenticate
If you need more info, add a comment and I'll post the web.config file.