REST Assured返回"没有找到与请求URI匹配的HTTP资源' **** / api / Document / getBrowserData'"

时间:2016-08-05 08:00:20

标签: httpresponse rest-assured

我已经实现了我的REST Assured代码,如下所示

String tempUrl = "***/api/Document/getBrowserData";
        Response  rjson  = given()
                .param("dsId",1108)
                .param("isNew", false)
                .param("oToken","eed0361d314888a3f153534844869d9f")
                .param("projId",837)
                .param("tId",-1)
                .param("type",2195)
                .param("userId",104)
                .post(tempUrl)
                .then()
                .extract()
                .response();
        System.out.println(rjson.asString());

当我对回复执行某些操作时:

System.out.println(rjson.asString()); // "Message":"No HTTP resource was found that matches
the request URI '
System.out.println(rjson.getHeaders()); // header value 
System.out.println(rjson.getStatusCode());  // 404

但是当我对PostMan做同样的事情时,我能够得到有效的回复。

0 个答案:

没有答案