public class TestHttpResponse extends HttpResponseStub
Modifier and Type | Class and Description |
---|---|
class |
TestHttpResponse.TestHttpEntity |
class |
TestHttpResponse.TestStatusLine |
Constructor and Description |
---|
TestHttpResponse() |
TestHttpResponse(int statusCode,
byte[] responseBody,
org.apache.http.Header... headers) |
TestHttpResponse(int statusCode,
java.lang.String responseBody) |
TestHttpResponse(int statusCode,
java.lang.String responseBody,
org.apache.http.Header... headers) |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(org.apache.http.Header header) |
boolean |
containsHeader(java.lang.String s) |
boolean |
entityContentStreamsHaveBeenClosed() |
org.apache.http.Header[] |
getAllHeaders() |
org.apache.http.HttpEntity |
getEntity() |
org.apache.http.Header |
getFirstHeader(java.lang.String s) |
org.apache.http.Header[] |
getHeaders(java.lang.String s) |
org.apache.http.Header |
getLastHeader(java.lang.String s) |
org.apache.http.params.HttpParams |
getParams() |
org.apache.http.StatusLine |
getStatusLine() |
org.apache.http.HeaderIterator |
headerIterator() |
org.apache.http.HeaderIterator |
headerIterator(java.lang.String s) |
void |
setHeader(org.apache.http.Header newHeader) |
void |
setParams(org.apache.http.params.HttpParams httpParams) |
protected void |
setResponseBody(java.lang.String responseBody) |
addHeader, getLocale, getProtocolVersion, removeHeader, removeHeaders, setEntity, setHeader, setHeaders, setLocale, setReasonPhrase, setStatusCode, setStatusLine, setStatusLine, setStatusLine
public TestHttpResponse()
public TestHttpResponse(int statusCode, java.lang.String responseBody)
public TestHttpResponse(int statusCode, java.lang.String responseBody, org.apache.http.Header... headers)
public TestHttpResponse(int statusCode, byte[] responseBody, org.apache.http.Header... headers)
protected void setResponseBody(java.lang.String responseBody)
public org.apache.http.StatusLine getStatusLine()
getStatusLine
in interface org.apache.http.HttpResponse
getStatusLine
in class HttpResponseStub
public org.apache.http.HttpEntity getEntity()
getEntity
in interface org.apache.http.HttpResponse
getEntity
in class HttpResponseStub
public org.apache.http.Header[] getAllHeaders()
getAllHeaders
in interface org.apache.http.HttpMessage
getAllHeaders
in class HttpResponseStub
public org.apache.http.Header getFirstHeader(java.lang.String s)
getFirstHeader
in interface org.apache.http.HttpMessage
getFirstHeader
in class HttpResponseStub
public org.apache.http.Header getLastHeader(java.lang.String s)
getLastHeader
in interface org.apache.http.HttpMessage
getLastHeader
in class HttpResponseStub
public org.apache.http.Header[] getHeaders(java.lang.String s)
getHeaders
in interface org.apache.http.HttpMessage
getHeaders
in class HttpResponseStub
public void addHeader(org.apache.http.Header header)
addHeader
in interface org.apache.http.HttpMessage
addHeader
in class HttpResponseStub
public void setHeader(org.apache.http.Header newHeader)
setHeader
in interface org.apache.http.HttpMessage
setHeader
in class HttpResponseStub
public org.apache.http.HeaderIterator headerIterator()
headerIterator
in interface org.apache.http.HttpMessage
headerIterator
in class HttpResponseStub
public org.apache.http.HeaderIterator headerIterator(java.lang.String s)
headerIterator
in interface org.apache.http.HttpMessage
headerIterator
in class HttpResponseStub
public boolean containsHeader(java.lang.String s)
containsHeader
in interface org.apache.http.HttpMessage
containsHeader
in class HttpResponseStub
public org.apache.http.params.HttpParams getParams()
getParams
in interface org.apache.http.HttpMessage
getParams
in class HttpResponseStub
public void setParams(org.apache.http.params.HttpParams httpParams)
setParams
in interface org.apache.http.HttpMessage
setParams
in class HttpResponseStub
public boolean entityContentStreamsHaveBeenClosed()