Example usage for org.apache.commons.httpclient HttpConnection getResponseInputStream

List of usage examples for org.apache.commons.httpclient HttpConnection getResponseInputStream

Introduction

In this page you can find the example usage for org.apache.commons.httpclient HttpConnection getResponseInputStream.

Prototype

public InputStream getResponseInputStream() throws IOException, IllegalStateException 

Source Link

Document

Return a InputStream suitable for reading the response.

Usage

From source file:org.parosproxy.paros.network.GenericMethod.java

/**
 * {@inheritDoc}/*w  ww .  ja  v  a 2  s . com*/
 * 
 * <strong>Note:</strong> Malformed HTTP header lines are ignored (instead of throwing an exception).
 */
/*
 * Implementation copied from HttpMethodBase#readResponseHeaders(HttpState, HttpConnection) but changed to use a custom
 * header parser (ZapHttpParser#parseHeaders(InputStream, String)).
 */
@Override
protected void readResponseHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
    getResponseHeaderGroup().clear();

    Header[] headers = ZapHttpParser.parseHeaders(conn.getResponseInputStream(),
            getParams().getHttpElementCharset());
    // Wire logging moved to HttpParser
    getResponseHeaderGroup().setHeaders(headers);
}