コード例 #1
0
 public HttpResponse receiveResponseHeader() throws HttpException, IOException {
   assertOpen();
   HttpResponse response = this.responseParser.parse();
   if (response.getStatusLine().getStatusCode() >= 200) {
     this.metrics.incrementResponseCount();
   }
   return response;
 }
コード例 #2
0
 public void receiveResponseEntity(final HttpResponse response) throws HttpException, IOException {
   if (response == null) {
     throw new IllegalArgumentException("HTTP response may not be null");
   }
   assertOpen();
   HttpEntity entity = this.entitydeserializer.deserialize(this.inbuffer, response);
   response.setEntity(entity);
 }