Class TestHttpResponse
java.lang.Object
org.robolectric.shadows.httpclient.HttpResponseStub
org.robolectric.shadows.httpclient.TestHttpResponse
- All Implemented Interfaces:
org.apache.http.HttpMessage
,org.apache.http.HttpResponse
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
-
Constructor Summary
ConstructorDescriptionTestHttpResponse
(int statusCode, byte[] responseBody, org.apache.http.Header... headers) TestHttpResponse
(int statusCode, String responseBody) TestHttpResponse
(int statusCode, String responseBody, org.apache.http.Header... headers) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHeader
(org.apache.http.Header header) boolean
boolean
org.apache.http.Header[]
org.apache.http.HttpEntity
org.apache.http.Header
org.apache.http.Header[]
getHeaders
(String s) org.apache.http.Header
org.apache.http.StatusLine
org.apache.http.HeaderIterator
org.apache.http.HeaderIterator
void
setHeader
(org.apache.http.Header newHeader) void
setParams
(HttpParams httpParams) protected void
setResponseBody
(String responseBody) Methods inherited from class org.robolectric.shadows.httpclient.HttpResponseStub
addHeader, getLocale, getProtocolVersion, removeHeader, removeHeaders, setEntity, setHeader, setHeaders, setLocale, setReasonPhrase, setStatusCode, setStatusLine, setStatusLine, setStatusLine
-
Constructor Details
-
TestHttpResponse
public TestHttpResponse() -
TestHttpResponse
-
TestHttpResponse
-
TestHttpResponse
public TestHttpResponse(int statusCode, byte[] responseBody, org.apache.http.Header... headers)
-
-
Method Details
-
setResponseBody
-
getStatusLine
public org.apache.http.StatusLine getStatusLine()- Specified by:
getStatusLine
in interfaceorg.apache.http.HttpResponse
- Overrides:
getStatusLine
in classHttpResponseStub
-
getEntity
public org.apache.http.HttpEntity getEntity()- Specified by:
getEntity
in interfaceorg.apache.http.HttpResponse
- Overrides:
getEntity
in classHttpResponseStub
-
getAllHeaders
public org.apache.http.Header[] getAllHeaders()- Specified by:
getAllHeaders
in interfaceorg.apache.http.HttpMessage
- Overrides:
getAllHeaders
in classHttpResponseStub
-
getFirstHeader
- Specified by:
getFirstHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
getFirstHeader
in classHttpResponseStub
-
getLastHeader
- Specified by:
getLastHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
getLastHeader
in classHttpResponseStub
-
getHeaders
- Specified by:
getHeaders
in interfaceorg.apache.http.HttpMessage
- Overrides:
getHeaders
in classHttpResponseStub
-
addHeader
public void addHeader(org.apache.http.Header header) - Specified by:
addHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
addHeader
in classHttpResponseStub
-
setHeader
public void setHeader(org.apache.http.Header newHeader) - Specified by:
setHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
setHeader
in classHttpResponseStub
-
headerIterator
public org.apache.http.HeaderIterator headerIterator()- Specified by:
headerIterator
in interfaceorg.apache.http.HttpMessage
- Overrides:
headerIterator
in classHttpResponseStub
-
headerIterator
- Specified by:
headerIterator
in interfaceorg.apache.http.HttpMessage
- Overrides:
headerIterator
in classHttpResponseStub
-
containsHeader
- Specified by:
containsHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
containsHeader
in classHttpResponseStub
-
getParams
- Specified by:
getParams
in interfaceorg.apache.http.HttpMessage
- Overrides:
getParams
in classHttpResponseStub
-
setParams
- Specified by:
setParams
in interfaceorg.apache.http.HttpMessage
- Overrides:
setParams
in classHttpResponseStub
-
entityContentStreamsHaveBeenClosed
public boolean entityContentStreamsHaveBeenClosed()
-