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