kshitizmittal / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

TruncatedChunkException when requesting large response body as a String #415

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am doing a GET on an endpoint which returns a 14M JSON response and it throws 
a TruncatedChunkException when I try to get the body as a String. The response 
is gzipped.

What steps will reproduce the problem?

Response response = get("http://domain.com");
String body = response.asString(); // throws TruncatedChunkException

But when I the following it works as expected:

Response response = expect().body(notNullValue()).get("http://domain.com");
String body = response.asString(); // this works properly

What is the expected output? What do you see instead?

I wish to get the body as a String but in the first scenario a 
TruncatedChunkException is thrown.

What version of the product are you using? On what operating system?

rest-assured v2.4.1 OSX and Linux AMI

Please provide any additional information below.

Original issue reported on code.google.com by alexei.n...@bazaarvoice.com on 15 Jul 2015 at 2:46