类 MockHttpInputMessage
- java.lang.Object
- org.springframework.mock.http.MockHttpInputMessage
- 所有已实现的接口:
HttpInputMessage,HttpMessage
- 直接已知子类:
MockClientHttpResponse
public class MockHttpInputMessage extends Object implements HttpInputMessage
Mock implementation ofHttpInputMessage.- 从以下版本开始:
- 3.2
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 MockHttpInputMessage(byte[] content)MockHttpInputMessage(InputStream body)
构造器详细资料
MockHttpInputMessage
public MockHttpInputMessage(byte[] content)
MockHttpInputMessage
public MockHttpInputMessage(InputStream body)
方法详细资料
getHeaders
public HttpHeaders getHeaders()
从接口复制的说明:HttpMessageReturn the headers of this message.- 指定者:
getHeaders在接口中HttpMessage- 返回:
- a corresponding HttpHeaders object (never
null)
getBody
public InputStream getBody() throws IOException
从接口复制的说明:HttpInputMessageReturn the body of the message as an input stream.- 指定者:
getBody在接口中HttpInputMessage- 返回:
- the input stream body (never
null) - 抛出:
IOException- in case of I/O errors