request.connect();
maxRateLimit = request.getHeaderFieldInt(ApplicationConstants.MAX_RATE_LIMIT_HEADER, -1);
currentRateLimit = request.getHeaderFieldInt(ApplicationConstants.CURRENT_RATE_LIMIT_HEADER, -1);
if (request.getResponseCode() != expected) {
Error error = unmarshallObject(Error.class,
getWrappedInputStream(request.getErrorStream(),
GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding())));
error.setStatusCode(request.getResponseCode());
throw createStackOverflowApiClientException(error);
} else {
return getWrappedInputStream(request.getInputStream(),
GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()));