I am using $http.get to consume a REST api from IBM bluemix. However when I run this code
var url = "https://username:pass@cdeservice.mybluemix.net"
var count = '/api/v1/messages/count';
searchQuery = 'hi'
$http.get(url + count + "?q=" + searchQuery)
.then(onResponse, onError);
I receive error 1012 - Error: Access to restricted URI denied. I am running on a server (access from localhost:6000) and I have even tried deploying and receiving the same error. Any solutions for this?