Move "rest" library under "draft/..." since it is more an experiment rather than a real REST library
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
deferred class
|
||||
REST_SERVICE_GATEWAY
|
||||
|
||||
inherit
|
||||
WSF_SERVICE
|
||||
|
||||
feature -- Access
|
||||
|
||||
build_gateway_and_launch
|
||||
local
|
||||
cgi: WGI_CGI_CONNECTOR
|
||||
do
|
||||
create cgi.make (Current)
|
||||
cgi.launch
|
||||
end
|
||||
|
||||
gateway_name: STRING = "CGI"
|
||||
|
||||
exit_with_code (a_code: INTEGER)
|
||||
do
|
||||
(create {EXCEPTIONS}).die (a_code)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,35 @@
|
||||
deferred class
|
||||
REST_SERVICE_GATEWAY
|
||||
|
||||
inherit
|
||||
WSF_SERVICE
|
||||
|
||||
feature -- Access
|
||||
|
||||
build_gateway_and_launch
|
||||
local
|
||||
libfcgi: WGI_LIBFCGI_CONNECTOR
|
||||
do
|
||||
create libfcgi.make (Current)
|
||||
libfcgi.launch
|
||||
end
|
||||
|
||||
gateway_name: STRING = "libFCGI"
|
||||
|
||||
exit_with_code (a_code: INTEGER)
|
||||
do
|
||||
(create {EXCEPTIONS}).die (a_code)
|
||||
end
|
||||
|
||||
|
||||
note
|
||||
copyright: "Copyright (c) 1984-2011, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
5949 Hollister Ave., Goleta, CA 93117 USA
|
||||
Telephone 805-685-1006, Fax 805-685-6869
|
||||
Website http://www.eiffel.com
|
||||
Customer support http://support.eiffel.com
|
||||
]"
|
||||
end
|
||||
@@ -0,0 +1,44 @@
|
||||
deferred class
|
||||
REST_SERVICE_GATEWAY
|
||||
|
||||
inherit
|
||||
WSF_SERVICE
|
||||
|
||||
feature -- Access
|
||||
|
||||
build_gateway_and_launch
|
||||
local
|
||||
app: NINO_SERVICE
|
||||
port_number: INTEGER
|
||||
base_url: STRING
|
||||
do
|
||||
port_number := 8080
|
||||
base_url := ""
|
||||
debug ("nino")
|
||||
print ("Example: start a Nino web server on port " + port_number.out +
|
||||
", %Nand reply Hello World for any request such as http://localhost:" + port_number.out + "/" + base_url + "%N")
|
||||
end
|
||||
create app.make_custom (agent wgi_execute, base_url)
|
||||
app.force_single_threaded
|
||||
|
||||
app.listen (port_number)
|
||||
end
|
||||
|
||||
gateway_name: STRING = "NINO"
|
||||
|
||||
exit_with_code (a_code: INTEGER)
|
||||
do
|
||||
(create {EXCEPTIONS}).die (a_code)
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "Copyright (c) 1984-2011, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
5949 Hollister Ave., Goleta, CA 93117 USA
|
||||
Telephone 805-685-1006, Fax 805-685-6869
|
||||
Website http://www.eiffel.com
|
||||
Customer support http://support.eiffel.com
|
||||
]"
|
||||
end
|
||||
Reference in New Issue
Block a user