Created
August 18, 2014 19:07
-
-
Save mlynch/622a39633c3c5814a779 to your computer and use it in GitHub Desktop.
post for mdata
This file contains hidden or 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
| $http({ | |
| method: 'POST', | |
| url: apiUrl + '/signup', | |
| headers: {'Content-Type': 'application/x-www-form-urlencoded'}, | |
| data: data, | |
| transformRequest: function(obj) { | |
| var str = []; | |
| for( var p in obj ) | |
| str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); | |
| return str.join("&"); | |
| }, | |
| }).then(function(resp) { | |
| return q.resolve(resp.data); | |
| }, function(err) { | |
| return q.reject(err); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment