HTTP Status code = 400

我是研究僧i 提交于 2020-01-06 07:44:58

问题


I am currently doing a Rest call with the jasper rest api and I have this response :

trailers: {},
  readable: false,
  url: '',
  method: null,
  statusCode: 400,
  client: 

So this is a bad request

Bad request 400

The request had bad syntax or was inherently impossible to be satisfied. 

And here is my nodejs request with 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);



});

});

And here is the doc for jasperserver api : http://www.scribd.com/doc/68405255/2/REST-Web-Services#page=30

Thanks

来源:https://stackoverflow.com/questions/9585645/http-status-code-400

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!