maxRateLimit = request.getHeaderFieldInt(ApplicationConstants.MAX_RATE_LIMIT_HEADER, -1);
currentRateLimit = request.getHeaderFieldInt(ApplicationConstants.CURRENT_RATE_LIMIT_HEADER, -1);
if (request.getResponseCode() != expected) {
throw new GitHubException(convertStreamToString(getWrappedInputStream(request.getErrorStream(),
GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()))));
} else {
return getWrappedInputStream(request.getInputStream(),
GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()));
}
} catch (IOException e) {
throw new GitHubException(e);
}
}