Angularjs Oauth Error: Failed To Execute 'setrequestheader' On 'xmlhttprequest': 'authorization: Bearer ' Is Not A Valid Http Header Field Name
My code for making GET call is With the above code getting issue: 'Error: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': 'Authorization: Bearer ' is not a valid HTTP h
Solution 1:
Use
...
headers: {
'Authorization': 'Bearer '+String(JSON.parse($cookies.authenticatedAccount).access_token)
},
...
Post a Comment for "Angularjs Oauth Error: Failed To Execute 'setrequestheader' On 'xmlhttprequest': 'authorization: Bearer ' Is Not A Valid Http Header Field Name"