allure-java
allure-java copied to clipboard
AllureRestAssured add UTF-8 encoding while viewing request/response file
Is your feature request related to a problem? Please describe. Having following code:
@Test
void testEnconding() {
RestAssured.given()
.contentType("application/json; charset=UTF-8")
.config(RestAssured.config().decoderConfig(decoderConfig().defaultContentCharset("UTF-8")))
.header("Content-Type", "application/json")
.filters(new AllureRestAssured())
.body("{\"name\": \"Это тест создание\"}")
.when()
.post("https://petstore.swagger.io/v2/pet");
}
While viewing test result preview of request body displays in a correct way, because encoding is set:
But while viewing request in separate tab (Open attachment in new tab) request body displays with some encoding symbols, because encoding is not set:
Describe the solution you'd like I propose to add encoding as UTF-8 while viewing request/response in a separate tab.