public class MockHttpOutputMessage extends Object implements HttpOutputMessage
HttpOutputMessage.| Constructor and Description |
|---|
MockHttpOutputMessage() |
| Modifier and Type | Method and Description |
|---|---|
OutputStream |
getBody()
Return the body content.
|
byte[] |
getBodyAsBytes()
Return body content as a byte array.
|
String |
getBodyAsString()
Return the body content interpreted as a UTF-8 string.
|
String |
getBodyAsString(Charset charset)
Return the body content as a string.
|
Cookies |
getCookies()
TODO ..
|
HttpHeaders |
getHeaders()
Return the headers.
|
public HttpHeaders getHeaders()
getHeaders in interface HttpMessagepublic OutputStream getBody() throws IOException
getBody in interface HttpOutputMessageIOException - in case of I/O Errorspublic byte[] getBodyAsBytes()
public String getBodyAsString()
public String getBodyAsString(Charset charset)
charset - the charset to use to turn the body content to a Stringpublic Cookies getCookies()
HttpMessagegetCookies in interface HttpMessage