Thank you very much for your solution, jan_blaha. I tried adding username:password to the url and it finally works!
Again, thanks for your help, han_blaha and bjrmatos.
Thank you very much for your solution, jan_blaha. I tried adding username:password to the url and it finally works!
Again, thanks for your help, han_blaha and bjrmatos.
Hi,
Below is my code:
app.get('/invoice', function(req, res, next) {
fs.readFile('./invoice.json', function (err, content) {
const invoiceData = JSON.stringify(JSON.parse(content));
var data = {
template:{"shortid":'BJMUIjAFWZ'},
// data:invoiceData
}
var options = {
url:'https://ptduw-cntn2014-nhom07.jsreportonline.net/api/report',
method:'POST',
json:data
}
try {
request(options).pipe(res);
} catch (err) {
res.write(err.message);
res.end();
}
});
});
I believe I got the correct template's shortid and the api's uri. Everything else is on default, I made no change to them.
Dear JsReport team,
For the last few days I've been trying to solve this problem: Whenever I try to render a report with jsreport online api, my website asks for authentication:
I tried using my website's admin account, as well as the jsreport account, but it just didn't get through. That window keeps popping up, and it doesn't even show whether the account is correct or not.
I'm new to both nodejs and jsreport, so this has really been difficult for me. I hope you guys can help me understand this authentication thing, or show me how to disable it completely if possible.
Looking forward to your reply.
Best regards,