| Modifier and Type | Method and Description |
|---|---|
default Response |
ResponseBuilder.AcceptedResponse()
Creates an empty response with only 202 - Accepted
|
default Response |
ResponseBuilder.CreatedResponse()
Creates an empty response with only 201 - Created
|
protected Response |
JSONServlet.delete(Request request)
Implements the DELETE method.
|
default Response |
ResponseBuilder.EmptyResponse(int responseCode)
Creates an empty response with only a response code
|
default Response |
ResponseBuilder.ErrorResponse(int responseCode,
String message)
Creates an error with a provided error code
|
default Response |
ResponseBuilder.ErrorResponse(Throwable throwable)
Creates an error response with a internal error code.
|
default Response |
ResponseBuilder.ErrorResponseMissingPath()
Creates an error with code 400 and the message that the path is missing
|
default Response |
ResponseBuilder.ErrorResponseNotFound(String message)
Creates an error with a 404 - Not found
|
default Response |
ResponseBuilder.ErrorResponseResourceAlreadyExists(String path)
Creates an error with code 403 and the message that the path already exists.
|
default Response |
ResponseBuilder.ErrorResponseUnsupportedOperation()
Creates an error with code 405 stating the operation is not supported.
|
protected Response |
JSONServlet.get(Request request)
Implements the GET method.
|
default Response |
ResponseBuilder.ObjectResponse(Object object)
Creates a response where the provided object will be converted to json.
|
default Response |
ResponseBuilder.ObjectResponse(Object object,
String charEncoding)
Creates a response where the provided object will be converted to json.
|
protected Response |
JSONServlet.post(Request request)
Implements the POST method.
|
protected Response |
JSONServlet.put(Request request)
Implements the PUT method.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
ResponseBuilder.writeResponse(javax.servlet.http.HttpServletResponse resp,
Response response)
Write the response to the client.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
ResponseBuilder.writeResponse(javax.servlet.http.HttpServletResponse resp,
Try<Response> response)
Write the response to the client.
|
Copyright © 2016, Peter Nerg Apache License v2.0