Hi, so i have a problem with this. .... when i call the http://localhost:3001/api/report, always it askeme about user and password, even i put the correct credencials but it's ask me again
-
const express = require('express');
const router = express.Router();
const request = require('request');router.get('/', async(req, res, next) => {
console.log('el cuerpo del filtro: ', req.body);
const data = {
template: { 'shortid': 'rkg6sD1NY8' },
options: {
preview: true
}
};
const options = {
uri: 'http://localhost:3001/api/report',
method: 'POST',
json: data
}
request(options).pipe(res);
//res.send('recibiendo');
});module.exports = router;
-
Can you try calling jsreport server using our official nodejs client? It may help you get over your auth problems.
https://jsreport.net/learn/nodejs-client
-
Thanks, it was successfully on my code. :)