Created
June 2, 2015 19:00
-
-
Save benjamincharity/5aed3191db63cf450ce5 to your computer and use it in GitHub Desktop.
Http post with external request object.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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