首页 > 解决方案 > 我想执行一个没有表单数据的 PUT 方法调用的 URI

问题描述

我正在尝试执行我的其余 API 脚本,其中没有使用表单数据。表示没有使用任何表单数据,仅执行了 URI,并将一个 TWF ID 添加到 URI。

public void test005_LoadRequest_Recall()
{
    ValidatableResponse getResponse = expect().statusCode(HttpStatus.SC_OK)
            .given()
            .spec(requestSpecification)
            .headers(getAuthData)
            .when()
            .put(MoneyRequestConfigEP.WORKFLOW+MoneyRequestConfigEP.RECALL+LoadRequestpojo.getTwf_id())
            .then()
            .spec(responseSpecification);
    String msg = getResponse.extract().jsonPath().getString("res_str.");
    softAssert.assertEquals(msg,"Resource was recalled successfully.", "the load is recalled");

请问有人可以提供解决方案吗?

标签: apirest-assured

解决方案


推荐阅读