trying to figure out the rest-test-connection issue

This commit is contained in:
Michael Hunger
2011-08-02 22:30:40 +02:00
parent 4b8c75557e
commit 6b5112a980

View File

@@ -39,7 +39,7 @@ public class RequestResult {
public static RequestResult extractFrom(ClientResponse clientResponse) {
final int status = clientResponse.getStatus();
final URI location = clientResponse.getLocation();
final String data = clientResponse.hasEntity() ? clientResponse.getEntity(String.class) : null;
final String data = status != Response.Status.NO_CONTENT.getStatusCode() ? clientResponse.getEntity(String.class) : null;
clientResponse.close();
return new RequestResult(status, location, data);
}