我已经实现了我的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做同样的事情时,我能够得到有效的回复。