Error when calling login api

am getting this error when calling /api/method/login

401 (UNAUTHORIZED)

“[“Traceback (most recent call last):\n File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 54, in application\n init_request(request)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 116, in init_request\n frappe.local.http_request = frappe.auth.HTTPRequest()\n File “/home/frappe/frappe-bench/apps/frappe/frappe/auth.py”, line 53, in init\n frappe.local.login_manager = LoginManager()\n File “/home/frappe/frappe-bench/apps/frappe/frappe/auth.py”, line 107, in init\n if self.login()==False: return\n File “/home/frappe/frappe-bench/apps/frappe/frappe/auth.py”, line 126, in login\n self.authenticate(user=user, pwd=pwd)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/auth.py”, line 197, in authenticate\n self.fail(_(‘Incomplete login details’), user=user)\n File “/home/frappe/frappe-bench/apps/frappe/frappe/auth.py”, line 228, in fail\n raise frappe.AuthenticationError\nAuthenticationError\n”]”

I’ve tested on postman works fine ?! and already enbaled CORS on nginx !!

_(‘Incomplete login details’),
See the above error I think you given an incomplete data

ok first I enabled CORS through this post http://tech.osteel.me/posts/2015/07/19/handling-cors-with-nginx.html and its working fine but when calling post req from angualr gives me this error , here is my angular code

   constructor(private http: Http) { }
 
signIn() {
   let loginURL = "https://mydomain/api/method/login";
    
let credentials= {usr:" ",pwd :" "};
this.http.post(loginURL,JSON.stringify(credentials))
.map(res=>res.json())
.subscribe(res=> console.log(res));
}

can’t get any details about the error!!