Object reference

Response

The Response object, its operations, examples and notes.

Object description

Represents the outgoing HTTP response in ZPE web execution. The web runtime creates it and exposes it through the RESPONSE value; it is not normally constructed with new ResponseObject().

Response functions configure status codes, headers, text or binary bodies, downloads, redirects, JSON output, and session values. All functions require permission level 0.

Availability: The Response object is documented as part of ZPE 1.14.4. Text, binary, and downloadable response bodies were added in ZPE 1.14.11.

Example

YASS
RESPONSE->set_header("Content-Type", "application/json")
RESPONSE->set_http_response("200")
RESPONSE->body("{\"ok\":true}")

Object functions