Hi Fabio,

On Wed, Feb 10, 2010 at 4:20 PM, Fabio Mascarenhas <mascaren...@acm.org>wrote:
>
> Ryan, Orbit does not buffer output by default, so you can't send a response
> to the client and continue processing. You have to use a special WSAPI rule
> to do that:
>
> -------
>
> local function wsapi_action(wsapi_env, param)
>   local request = wsapi.request.new(wsapi_env)
>   local response = coroutine.wrap(function ()
>     coroutine.yield(my_waiting_html)
>     ... do long operation ...
>     coroutine.yield(rest of response)
>   end)
>   return 200, { ["Content-Type"] = "text/html" }, response
> end
>
> orbit_app:dispatch_wsapi(wsapi_action, "/foo/(%d+)")
> --------
>
> WSAPI's request object is pretty similar to Orbit's web object, but
> slightly different. Please see the WSAPI docs.
>

Thanks for the quick response. It worked great, but I have been using
htmlify and it does not work in the WSAPI dispatch. Is there any way to get
it to work? Also is there a way to get the web object in the WSAPI dipatch?
Thanks.
-- 
Regards,
Ryan
_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to