0

响应 response=given().that().parameter("j_username",userName).parameter("j_password", password).when().post(" http://www.rest.com/qcbin/authentication-点/login.jsp?redirect-url=http%3A%2F%2Fx-pqrs12%3A1230%2Fqcbin%2Frest%2Fis-authenticated%3Flogin-form-required%3Dy ").then().extract().response( );

System.out.println(response.asString());

我想使用此代码登录。但是我收到了 HTML 响应,但我无法使用它登录。请帮助我摆脱这个问题。

提前致谢。问候,普拉特

4

1 回答 1

0

也许您正在寻找表单身份验证?

given().auth().form("username", "password", new FormAuthConfig(..)). .. 
于 2014-07-08T06:14:54.287 回答