HTTP Response

Summary

Respond to a HTTP request.

Ports

When an event is received on the in port, a response is emitted according to the configuration made in Settings -> Parameters.

Input/Output Format

Any value is accpeted as input.

Variable interpolation used in Settings -> Parameters may impose further assumptions.

Events

This function emit a response event when an event is received on the in port. The emitted event has the following structure:

{
    status,
    headers,
    body
}

status is a number representing an HTTP status code.
headers is a object. The properties of the object represents each header. The property name represents the header name while the property value corresponds to the header value.
body may be any value.

The values for these properties are set in Settings -> Parameters.