Would you please advise how to configure RestAssured to wait until complete response data is returned.
I am trying to validate a data feed using http get as shown below.
given()
.relaxedHTTPSValidation()
.header("Content-Type", "application/json")
.when()
.get("/API/data/")
.then()
.statusCode(200)
.log().all();
In this context, Rest Assured logging only few lines of data, does not seem to wait until complete response data is returned . This works ok when data response is small.
In this case, it seems to log only data that's available when http status code is returned.
Consequently I am seeing the following error message: Premature end of Content-Length delimited message body (expected: 1486; received: 1088)
Thx
If you want to check the status code you should use the expect().statusCode(x).
Anyway the tool waits until the whole response is returned from the server and only logs it out after that. So it shouldn't be a problem with big JSON/XML responses either.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With