From 640c67db43a5a816cc6e77165a04700625bc2795 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Wed, 1 Apr 2015 22:44:35 +0200 Subject: [PATCH] Output types example: Update README --- examples/output_types/README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/output_types/README.md b/examples/output_types/README.md index 4db2784..f22428f 100644 --- a/examples/output_types/README.md +++ b/examples/output_types/README.md @@ -1,6 +1,11 @@ -ScriptForm raw example -====================== +ScriptForm output example +========================= -Raw callbacks can be used to obtain more control over what is sent to the -user's browser. For instance, you can stream contents to the browser, send -files, show images, etc. +Output tpyes determine how Scriptform handles the output from a callback. The +options are: `escaped` (default), `html` and `raw`. The `escaped` option wraps +the output of the callback in PRE tags and escapes any HTML entities. The +`html` option doesn't, which lets the script include HTML formatting in the +output. The `raw` option directly streams the output of the script to the +browser. This allows you to stream images, binary files, etc directly to the +browser. The script should include a full HTTP response including appropriate +headers.