<?lsp

local data -- POST data
if "POST" == request:method() then
    trace"HTTP POST"
    data=request:data()
    for key,val in pairs(data) do
       trace(key,val)
    end
    -- If AJAX call.
    if request:header"x-requested-with" then
       response:json{status="OK"}
    end
else
    data={} -- Empty
end

-- We increment a page counter  each time this page is accessed, excluding AJAX.
page.counter = page.counter and page.counter+1 or 1


?>
<div class="header">
  <h1>HTML Form</h1>
  <h2>Standard For