Class MarshaledResponse

java.lang.Object
com.soklet.core.MarshaledResponse

@ThreadSafe public class MarshaledResponse extends Object
A finalized representation of a Response, suitable for sending to clients over the wire.

Your application's ResponseMarshaler is responsible for taking the Response returned by a Resource Method as input and converting its Response.getBody() to a byte[].

For example, if a Response were to specify a body of List.of("one", "two"), a ResponseMarshaler might convert it to the JSON string ["one", "two"] and provide as output a corresponding MarshaledResponse with a body of UTF-8 bytes that represent ["one", "two"].

Full documentation is available at https://www.soklet.com/docs/response-writing.

Author:
Mark Allen