benjamincharity
6/2/2015 - 7:00 PM

Http post with external request object.

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);

});