Merge changes from Javier
- update on RESTbuck examples - new example - fixed bad typo in WSF_REQUEST Reverted some changes such as - http_client_response: keep the headers as a list to handle multiple message-value with same message-name Fixed simple and simple_file example Improved HTTP_HEADER Changed libcurl implementation for http client - now the header from the context really overwrite any of the session headers - better design which is more strict, and remove any doubt about context's header usage
This commit is contained in:
30
examples/simple/application.e
Normal file
30
examples/simple/application.e
Normal file
@@ -0,0 +1,30 @@
|
||||
note
|
||||
description : "simple application root class"
|
||||
date : "$Date$"
|
||||
revision : "$Revision$"
|
||||
|
||||
class
|
||||
APPLICATION
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Run application.
|
||||
local
|
||||
s: DEFAULT_SERVICE
|
||||
do
|
||||
create s.make_and_launch (agent execute)
|
||||
end
|
||||
|
||||
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
do
|
||||
-- To send a response we need to setup, the status code and
|
||||
-- the response headers.
|
||||
res.write_header ({HTTP_STATUS_CODE}.ok, <<["Content-Type", "text/plain"], ["Content-Length", "11"]>>)
|
||||
res.write_string ("Hello World")
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user