Get the MIME type of the payload.
Get the payload string. The string is assumed to be UTF-8 encoded.
Returns true if the payload and content-type are set. Returns false if the error message and error types are set.
Create a failure response with the given error message and error type. The content-type is always set to application/json in this case.
Create a successful invocation response with the given payload and content-type.