Hi List,
A small DOC fix attached for the lua applet example.
Regards,
PiBa-NL
From 4ecbd5254b1b3f7b44d0746bc14fc22b6b9650f9 Mon Sep 17 00:00:00 2001
From: Pieter Baauw <[email protected]>
Date: Thu, 1 Oct 2015 22:47:12 +0200
Subject: [PATCH] DOC: fix lua use-service example

---
 doc/lua-api/index.rst | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/lua-api/index.rst b/doc/lua-api/index.rst
index 1f02541..54eae8f 100644
--- a/doc/lua-api/index.rst
+++ b/doc/lua-api/index.rst
@@ -408,12 +408,12 @@ Core class
 
 .. code-block:: lua
 
-  core.register_service("hello-world", "http" }, function(txn)
+  core.register_service("hello-world", "http" }, function(applet)
      local response = "Hello World !"
      applet:set_status(200)
-     applet:add_header("content-length", string.length(response))
+     applet:add_header("content-length", string.len(response))
      applet:add_header("content-type", "text/plain")
-     applet:start_reponse()
+     applet:start_response()
      applet:send(response)
   end)
 ..
@@ -1361,12 +1361,12 @@ AppletHTTP class
   This is an hello world sample code:
 
 .. code-block:: lua
-  core.register_service("hello-world", "http" }, function(txn)
+  core.register_service("hello-world", "http" }, function(applet)
      local response = "Hello World !"
      applet:set_status(200)
-     applet:add_header("content-length", string.length(response))
+     applet:add_header("content-length", string.len(response))
      applet:add_header("content-type", "text/plain")
-     applet:start_reponse()
+     applet:start_response()
      applet:send(response)
   end)
 
-- 
1.9.5.msysgit.1

Reply via email to