PDF shows empty when i get and write in web page

var http = require("http");
//var app = express();
var request = require("request");

http.createServer(function (req, res) {

qs: {j_username: "jasperadmin", j_password: "jasperadmin"}

},

function(err, res1, body1) {
if(err) {
return console.error(err);
}
 
qs: {j_username: "jasperadmin" , j_password:"jasperadmin"} },
function(error, response, body) {
// console.log(body);
res.writeHead(200 ,{'Content-Type': 'application/pdf'})
res.end(body);
 
 
});

});
}).listen(8081);
console.log("Server is running n 8081");

It returns the pdf page empty but when i run the rest_v2 it shows the pdf with data, please help

a.manojkumar1987's picture
Joined: Apr 14 2017 - 5:37am
Last seen: 4 months 1 week ago

0 Answers:

No answers yet
Feedback
randomness