webmcp
view framework/env/request/configure.lua @ 382:810c020b0da4
Reverted changes to mondelefant_result_index and mondelefant_result_newindex C-functions (proxying of JSON document)
| author | jbe | 
|---|---|
| date | Mon Nov 16 18:31:49 2015 +0100 (2015-11-16) | 
| parents | c3d539e33710 | 
| children | 
 line source
     1 --[[--
     2 request.configure(
     3   func              -- function which is performing the configuration
     4 )
     6 Registers a function to be called on every request only if a request is not in progress yet. Executes the function once in any case.
     8 --]]--
    10 function request.configure(func)
    11   if not request._in_progress then
    12     local initializers = request._initializers
    13     initializers[#initializers+1] = func
    14   end
    15   func()
    16 end
