Interface MkAnswer

All Known Implementing Classes:
MkAnswer.Simple

@Immutable public interface MkAnswer
Mock response.
Since:
0.10
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Simple implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    HTTP response body.
    byte[]
    HTTP response body as bytes.
    HTTP response headers.
    int
    HTTP response status.
  • Method Details

    • status

      int status()
      HTTP response status.
      Returns:
      The status code
    • headers

      Map<String,List<String>> headers()
      HTTP response headers.
      Returns:
      The headers
    • body

      String body()
      HTTP response body.
      Returns:
      The body, as a UTF-8 string
    • bodyBytes

      byte[] bodyBytes()
      HTTP response body as bytes.
      Returns:
      The body, as byte array