New to Sails, i 'am wondering how can i get access to my Jira account via Sails in order to create/edit/search some Issues with the Jira API REST.
I searched for this evrywhere, can someone help me please ?
Here is an exemple of what i want to do :
module.exports = {
test: function(req, res)
var https = require('https');
var https = require('https'), options = {
host : "jira.company.com",
port : 80,
path : "/rest/api/2/search?jql=issue=TASC-1",
method : 'GET'};
https.request(options, function(response) {
var responseData = '';
response.setEncoding('utf8');
response.on('data', function(chunk){
responseData += chunk;
});
response.once('error', function(err){
// Some error handling here, e.g.:
res.serverError(err);
});
response.on('end', function(){
try {
// response available as `responseData` in `yourview`
res.locals.requestData = JSON.parse(responseData);
} catch (e) {
sails.log.warn('Could not parse response from options.hostname: ' + e);
}
res.view('client');
}); }).end();}}
But i got nothing in my View, i think it's normal because i did not authenticate.