InvocationResponse

Members

Functions

getContentType
string getContentType()

Get the MIME type of the payload.

getPayload
string getPayload()

Get the payload string. The string is assumed to be UTF-8 encoded.

isSuccess
bool isSuccess()

Returns true if the payload and content-type are set. Returns false if the error message and error types are set.

Static functions

failure
InvocationResponse failure(string errorMessage, string errorType)

Create a failure response with the given error message and error type. The content-type is always set to application/json in this case.

success
InvocationResponse success(string payload, string contentType)

Create a successful invocation response with the given payload and content-type.

Meta