echo Action #

Sends its text content as response body and terminates the request.

<echo>test</echo>

The intended use is error handling or debugging.

Syntax #

The mime attribute defines the response Content-Type. Default: text/plain

The status attribute defines the HTTP response status code. This is a shortcut for a set-status action.

Examples #

<!-- 400 Bad Request with JSON body -->
<echo mime="application/json" status="400">
{
  "error": {
    "message": "Something went wrong",
    "code": 4711
  }
}
</echo>
<!-- 204 No Content -->
<echo status="204"/>

The action body contains static text. If you need dynamic processing, use a template action (and <break/>) instead.