- changed status to open
RestAssuredRequest fails with a ClassCastException if the body is not a String
Issue #270
resolved
I am using RestAssured to test a PUT endpoint that consumes multipart/form-data requests. Part of its behaviour is that it will set the request body to byte[0] for multipart requests not using POST or PATCH.
When the request is validated by the OpenApiValidationFilter, the RestAssuredRequest.of() method creates a SimpleRequest.Builder with body set to originalRequest.getBody(). This expects a String but since it’s a byte[0] a ClassCastException is thrown.
Comments (2)
-
-
- changed status to resolved
Available in v2.10.1
- Log in to comment