我正在使用jasper rest api进行Rest调用 我有this回复:
trailers: {},
readable: false,
url: '',
method: null,
statusCode: 400,
client:
所以这是一个糟糕的请求
Bad request 400
The request had bad syntax or was inherently impossible to be satisfied.
这是我的{j}请求request module:
var request = require("request");
request.post({url: "http://localhost:8080/jasperserver/rest/login", qs: {j_username:"jasperadmin", j_password: "jasperadmin"}}, function(err) {
if(err) {
return console.error(err);
}
request.put("http://localhost:8080/jasperserver/rest/report/reports/samples/AllAccounts", function(err, res, body) {
if(err) {
return console.error(err);
}
console.log("Response ",res);
});
});
以下是jasperserver api的文档:http://www.scribd.com/doc/68405255/2/REST-Web-Services#page=30
谢谢