Class MockHttpInputMessage

java.lang.Object
org.springframework.mock.http.MockHttpInputMessage
All Implemented Interfaces:
org.springframework.http.HttpInputMessage, org.springframework.http.HttpMessage
Direct Known Subclasses:
MockClientHttpResponse

public class MockHttpInputMessage extends Object implements org.springframework.http.HttpInputMessage
Mock implementation of HttpInputMessage.
Since:
3.2
Author:
Rossen Stoyanchev
  • Constructor Details

    • MockHttpInputMessage

      public MockHttpInputMessage(byte[] body)
      Create a MockHttpInputMessage with the supplied body.
    • MockHttpInputMessage

      public MockHttpInputMessage(InputStream body)
      Create a MockHttpInputMessage with the supplied body.
  • Method Details

    • getHeaders

      public org.springframework.http.HttpHeaders getHeaders()
      Specified by:
      getHeaders in interface org.springframework.http.HttpMessage
    • getBody

      public InputStream getBody() throws IOException
      Specified by:
      getBody in interface org.springframework.http.HttpInputMessage
      Throws:
      IOException