-
-
Save RafaPegorari/82f918deadd9474c5afc8b77dd631bd4 to your computer and use it in GitHub Desktop.
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
/** | |
* GET / | |
*/ | |
exports.index = function (req, res) { | |
jiraResponse(req.params.key); | |
res.render('story', { | |
//title: jiraResponse(req.params.key) | |
}); | |
}; | |
let jiraResponse = function (key) { | |
let request = require('request-promise'); | |
let url = "https://ihm-software.atlassian.net/rest/api/2/issue/x1-1098"; | |
//auth = "Basic " + new Buffer(username + ":" + password).toString("base64"); | |
console.log('request'); | |
request( | |
{ | |
url: url, | |
headers: { "Authorization": "Basic bGNhbnRlbGxpOmQzMGs1MFhh" }, | |
json: true | |
} | |
).then(function (response) { | |
console.log('then'); | |
}).finally(function() { | |
console.log('finally'); | |
}); | |
console.log('fim request'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment