Package com.predic8.membrane.core.http
Class Response.ResponseBuilder
java.lang.Object
com.predic8.membrane.core.http.Response.ResponseBuilder
- Enclosing class:
- Response
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbody(byte[] body) body(InputStream stream, boolean closeStreamWhenDone) Supposes UTF8 encoding.Used for returning JSON from JavascriptInterceptor JSON MAPOverwrites the body with an empty body and sets the Content-Length to 0build()contentType(String type) static Response.ResponseBuilderstatus(int code) yaml()
-
Constructor Details
-
ResponseBuilder
public ResponseBuilder()
-
-
Method Details
-
build
-
status
-
status
-
body
Supposes UTF8 encoding. -
body
public Response.ResponseBuilder body(Map<String, Object> map) throws com.fasterxml.jackson.core.JsonProcessingExceptionUsed for returning JSON from JavascriptInterceptor JSON MAP- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
body
-
body
public Response.ResponseBuilder body(InputStream stream, boolean closeStreamWhenDone) throws IOException - Throws:
IOException
-
bodyEmpty
Overwrites the body with an empty body and sets the Content-Length to 0 -
header
-
header
-
contentType
-
yaml
-
location
-
newInstance
-
dontCache
-