How could I set the accept and contentType to json projectwide in my rest tests?
given()
.accept(ContentType.JSON)
.contentType(ContentType.JSON)
This will reduce quite some repetitive code
答案 0 :(得分:1)
RestAssured.requestSpecification = new RequestSpecBuilder()
.setContentType(ContentType.JSON)
.setAccept(ContentType.JSON)
.build();