Updated EWSGI specification (markdown)

This commit is contained in:
seibo
2011-07-12 15:57:54 -07:00
parent 4904aba360
commit e63553555d

View File

@@ -56,24 +56,24 @@ This is the web server side. The server sends the request information in an envi
This is the Eiffel application side. Basically one should be able to write: This is the Eiffel application side. Basically one should be able to write:
class APPLICATION class APPLICATION
inherit inherit
EW_APPLICATION EW_APPLICATION
creation creation
make - - THIS IS PART OF THE EWSGI SPECIFICATION! make - - THIS IS PART OF THE EWSGI SPECIFICATION!
features features
execute (env: ENVIRON): RESPONSE is - - THIS IS PART OF THE EWSGI SPECIFICATION! execute (env: ENVIRON): RESPONSE is - - THIS IS PART OF THE EWSGI SPECIFICATION!
do do
create Result create Result
if env.path_info = ”/hello” then if env.path_info = ”/hello” then
Result.set_status (Http_ok) Result.set_status (Http_ok)
Result.set_header (”Content-Type”, ”text/html; charset=utf-8”) Result.set_header (”Content-Type”, ”text/html; charset=utf-8”)
Result.put_contents (”<html><body>Hello World</body></html>”) Result.put_contents (”<html><body>Hello World</body></html>”)
else else
Result.set_status (Http_not_found) Result.set_status (Http_not_found)
end end
end end
end end`
Or to register handlers for specific URL paths (or regexp based URL path expressions): Or to register handlers for specific URL paths (or regexp based URL path expressions):