Unable to 'GET' contacts data using Connect REST API from JavaScript: HTTP 401
Content
I am trying to get a list of contacts from our OSvC instance using the Connect REST API for contacts object. The REST endpoint works flawlessly using SOAPUI and also when I execute it using the browser (Chrome and Firefox) directly. However when I try to use endpoint in JavaScript using a simple HTML form, the response HTTP 401 is returned.
I'm passing the 'Authorization' header in the code for a get, but when I check the network request (in Chrome Developer tools), the header is missing! Morever this same code works if I use method JSONP instead of GET.
0