Removed any (put|write)_file_content from the WSF_ or WGI_ OUTPUT classes
Now DEFAULT_SERVICE has to be created instead of inherited. - This seems to be better for new user, and this avoid potential conflict and difference when inheriting between the various DEFAULT_SERVICE implementation. - remember that DEFAULT_SERVICE, is mainly to help the user to build its very first service. Use READABLE_STRING_8 as argument whenever it is possible. Added WSF_RESPONSE_MESSAGE, and WSF_RESPONSE.put_response (a_response_message) Now WSF_RESPONSE inherit from WGI_RESPONSE
This commit is contained in:
@@ -8,24 +8,21 @@ class
|
||||
HELLO_ROUTED_WORLD
|
||||
|
||||
inherit
|
||||
ANY
|
||||
|
||||
URI_TEMPLATE_ROUTED_SERVICE
|
||||
|
||||
ROUTED_SERVICE_HELPER
|
||||
|
||||
DEFAULT_SERVICE
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
|
||||
make
|
||||
local
|
||||
s: DEFAULT_SERVICE
|
||||
do
|
||||
initialize_router
|
||||
make_and_launch
|
||||
create s.make_and_launch (agent execute)
|
||||
end
|
||||
|
||||
create_router
|
||||
@@ -90,7 +87,11 @@ feature -- Execution
|
||||
n: INTEGER
|
||||
i: INTEGER
|
||||
s: STRING_8
|
||||
df: WSF_FILE_RESPONSE
|
||||
do
|
||||
create df.make_html ("index.html")
|
||||
df.set_no_cache
|
||||
|
||||
l_url := req.script_url ("/home")
|
||||
|
||||
n := 3
|
||||
@@ -199,7 +200,7 @@ feature -- Execution
|
||||
|
||||
handle_hello (ctx: REQUEST_URI_TEMPLATE_HANDLER_CONTEXT; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
do
|
||||
execute_hello (req, res, Void, ctx)
|
||||
execute_hello (req, res, ctx.string_parameter ("name"), ctx)
|
||||
end
|
||||
|
||||
handle_anonymous_hello (ctx: REQUEST_URI_TEMPLATE_HANDLER_CONTEXT; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
|
||||
Reference in New Issue
Block a user