| Modifier and Type | Field and Description | 
|---|---|
| private byte[] | body | 
| private int | code | 
| private org.apache.http.Header[] | headers | 
| private static org.slf4j.Logger | LOG | 
| private org.apache.http.HttpResponse | resp | 
| private InputStream | stream | 
| Constructor and Description | 
|---|
| Response(int code)Constructor | 
| Response(int code,
        org.apache.http.Header[] headers)Constructor | 
| Response(int code,
        org.apache.http.Header[] headers,
        byte[] body)Constructor | 
| Response(int code,
        org.apache.http.Header[] headers,
        org.apache.http.HttpResponse resp,
        InputStream in)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| byte[] | getBody()Returns the HTTP response body | 
| int | getCode()Returns the HTTP response code | 
| String | getHeader(String key) | 
| org.apache.http.Header[] | getHeaders()Returns the HTTP response headers | 
| String | getLocation()Returns the value of the Location header | 
| InputStream | getStream()Gets the input stream instance. | 
| boolean | hasBody()Returns true if a response body was sent | 
| void | setBody(byte[] body) | 
| void | setCode(int code) | 
| void | setHeaders(org.apache.http.Header[] headers) | 
private static final org.slf4j.Logger LOG
private int code
private org.apache.http.Header[] headers
private byte[] body
private org.apache.http.HttpResponse resp
private InputStream stream
public Response(int code)
code - the HTTP response codepublic Response(int code, org.apache.http.Header[] headers)
code - the HTTP response codeheaders - the HTTP response headerspublic Response(int code, org.apache.http.Header[] headers, byte[] body)
code - the HTTP response codeheaders - the HTTP response headersbody - the response body, can be nullpublic Response(int code, org.apache.http.Header[] headers, org.apache.http.HttpResponse resp, InputStream in)
code - the HTTP response codeheaders - headers the HTTP response headersresp - the responsein - Inputstream if the response had one.public int getCode()
public InputStream getStream()
public org.apache.http.Header[] getHeaders()
public String getLocation()
public boolean hasBody()
public byte[] getBody()
public void setCode(int code)
code - the HTTP response codepublic void setHeaders(org.apache.http.Header[] headers)
headers - the HTTP response headerspublic void setBody(byte[] body)
body - the response bodyCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.