MkAnswer.Simple
Constructor and Description |
---|
MkAnswer.Simple(int status)
Public ctor (with empty HTTP body).
|
MkAnswer.Simple(int status,
Iterable<Map.Entry<String,String>> headers,
byte[] body)
Public ctor.
|
MkAnswer.Simple(int status,
String body)
Public ctor.
|
MkAnswer.Simple(String body)
Public ctor.
|
Modifier and Type | Method and Description |
---|---|
String |
body()
HTTP response body.
|
Map<String,List<String>> |
headers()
HTTP response headers.
|
int |
status()
HTTP response status.
|
String |
toString() |
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 MkAnswer.Simple(String body)
body
- Body of HTTP responsepublic MkAnswer.Simple(int status)
status
- HTTP statuspublic MkAnswer.Simple(int status, String body)
status
- HTTP statusbody
- Body of HTTP responsepublic int status()
MkAnswer
public Map<String,List<String>> headers()
MkAnswer
public 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
- BodyCopyright © 2012–2016 jcabi.com. All rights reserved.