Having some trouble turning this curl command which calls an internal api function to an $http.post request
curl -X POST 'https://api-dev.message360.com/api/v2/webrtc/authenticate.json' -u 'xxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxx' -d 'userName=test@test.com'
----EDIT------
I have it set up like this Theres a form with ng-model=user
var data = {
accountSid : "xxxxxx-xxxx-x-xx",
authToken : "xxxxxxxxxxxxxx",
userName : "xxxxx@xxxx.com"
}
$http.post(url, data).then(function(response) {
console.log(response);
}
but i'm getting an error its not returning anything..