MkAnswer.Simple| Constructor and Description | 
|---|
| Simple(int status)Public ctor (with empty HTTP body). | 
| Simple(int status,
      Iterable<Map.Entry<String,String>> headers,
      byte[] body)Public ctor. | 
| Simple(int status,
      String body)Public ctor. | 
| Simple(String body)Public ctor. | 
| Modifier and Type | Method and Description | 
|---|---|
| String | body()HTTP response body. | 
| byte[] | bodyBytes()HTTP response body as bytes. | 
| Map<String,List<String>> | headers()HTTP response headers. | 
| int | status()HTTP response status. | 
| String | toString() | 
| MkAnswer.Simple | withBody(byte[] body)Make a copy of this answer, with another body. | 
| MkAnswer.Simple | withBody(String body)Make a copy of this answer, with another body. | 
| MkAnswer.Simple | withHeader(String name,
          String value)Make a copy of this answer, with an extra header. | 
| MkAnswer.Simple | withStatus(int status)Make a copy of this answer, with another status code. | 
public Simple(String body)
body - Body of HTTP responsepublic Simple(int status)
status - HTTP statuspublic Simple(int status,
              String body)
status - HTTP statusbody - Body of HTTP responsepublic int status()
MkAnswerpublic Map<String,List<String>> headers()
MkAnswerpublic byte[] bodyBytes()
MkAnswerpublic MkAnswer.Simple withHeader(String name, String value)
name - Name of the headervalue - ImmutableHeader valuepublic MkAnswer.Simple withStatus(int status)
status - Status codepublic MkAnswer.Simple withBody(String body)
body - Bodypublic MkAnswer.Simple withBody(byte[] body)
body - BodyCopyright © 2012–2021 jcabi.com. All rights reserved.