Last active
January 5, 2017 08:38
-
-
Save jacobjuul/cfc3faa290830649c70140321f0699f1 to your computer and use it in GitHub Desktop.
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
return new Promise((resolve, reject) => { | |
superagent | |
.post(params.url) | |
.auth(params.auth.username, params.auth.password) | |
.send(params.payload) | |
.set('Accept', 'application/json') | |
.end((error, res) => { | |
error ? reject(error) : resolve(res); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment