Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Http post with external request object.
var req = {
method: 'POST',
url: ENV.API_END_POINT + '/users',
headers: {
'Authorization': 'Basic ' + Base64Service.encode(mUser + ':' + mPass)
},
data: user
};
$http(req)
.success(function(data) {
deferred.resolve(data);
})
.error(function(data) {
deferred.reject(data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment