I am trying to get token from ibm watson using my username,password and 
url. Here is my curl Command that is working fine

curl --basic --user 
04ba08c6-4505-4125-aa04-e89350fc28ae:1476c62b-6149-429a-89f7-a546df89caf5 
https://ibm-watson-ml.mybluemix.net/v2/identity/token

but when i try it in angularjs it gives me error

404 Not Found

Here is my angular code

    user = "04ba08c6-4505-4125-aa04-e89350fc28ae";
    pass  = "1476c62b-6149-429a-89f7-a546df89caf5";
    aurl  = "https://ibm-watson-ml.mybluemix.net/v2/identity/token";;
    var headers = {"Authorization": "Basic " + user+":"+pass};
    $http.get(aurl, {headers: headers}).then(function (response) {
     alert(response.data);
     //handle data
    });

Please let me know whats the error in my code?

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to