Modifier and Type | Field and Description |
---|---|
String |
body
Optional response body as text.
|
byte[] |
bodyBytes
Optional response body as raw bytes.
|
String |
contentType
If set, equals to setting
Content-Type response header. |
Map<String,String> |
headers
Response headers.
|
Path |
path
File path to respond with.
|
Integer |
status
Response status code, defaults to
200 . |
Constructor and Description |
---|
FulfillOptions() |
Modifier and Type | Method and Description |
---|---|
Route.FulfillOptions |
setBody(String body) |
Route.FulfillOptions |
setBodyBytes(byte[] bodyBytes) |
Route.FulfillOptions |
setContentType(String contentType) |
Route.FulfillOptions |
setHeaders(Map<String,String> headers) |
Route.FulfillOptions |
setPath(Path path) |
Route.FulfillOptions |
setStatus(int status) |
public String body
public byte[] bodyBytes
public String contentType
Content-Type
response header.public Map<String,String> headers
public Path path
path
is a relative path, then it
is resolved relative to the current working directory.public Integer status
200
.public Route.FulfillOptions setBody(String body)
public Route.FulfillOptions setBodyBytes(byte[] bodyBytes)
public Route.FulfillOptions setContentType(String contentType)
public Route.FulfillOptions setHeaders(Map<String,String> headers)
public Route.FulfillOptions setPath(Path path)
public Route.FulfillOptions setStatus(int status)
Copyright © 2021. All rights reserved.