Code example for HttpResponse

Methods: getStatusLine

0
     
    public HttpResponse receiveResponseHeader() 
            throws HttpException, IOException { 
        assertOpen(); 
        HttpResponse response = (HttpResponse) this.responseParser.parse();
        if (response.getStatusLine().getStatusCode() >= 200) {
            this.metrics.incrementResponseCount();
        } 
        return response;
    } 
     
    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);
    }