HttpResponse response = doPost(String.format("data/explore/queries/%s/%s", handle.getHandle(), "next"),
GSON.toJson(ImmutableMap.of("size", size)), null);
if (HttpResponseStatus.OK.getCode() == response.getResponseCode()) {
return parseJson(response, ROW_LIST_TYPE);
} else if (HttpResponseStatus.NOT_FOUND.getCode() == response.getResponseCode()) {
throw new HandleNotFoundException("Handle " + handle.getHandle() + "not found.");
}
throw new ExploreException("Cannot get next results. Reason: " + getDetails(response));
}