Added skeleton for Eiffel Net implementation of HTTP_CLIENT solution.

This is work in progress.
This commit is contained in:
2015-03-11 14:58:13 +01:00
parent 061e88c9fe
commit 29b55f36cf
10 changed files with 285 additions and 25 deletions

View File

@@ -14,9 +14,10 @@ inherit
feature {NONE} -- Initialization
make (a_url: READABLE_STRING_8; a_session: like session; ctx: like context)
make (a_url: READABLE_STRING_8; a_request_method: like request_method; a_session: like session; ctx: like context)
-- Initialize `Current'.
do
request_method := a_request_method
session := a_session
url := a_url
headers := session.headers.twin
@@ -29,6 +30,8 @@ feature {NONE} -- Initialization
ctx_header_set: ctx /= Void implies across ctx.headers as ctx_h all attached headers.item (ctx_h.key) as v and then v.same_string (ctx_h.item) end
end
feature {NONE} -- Internal
session: HTTP_CLIENT_SESSION
context: detachable HTTP_CLIENT_REQUEST_CONTEXT
@@ -44,13 +47,18 @@ feature -- Status report
feature -- Access
request_method: READABLE_STRING_8
deferred
end
-- Request method associated with Current request.
url: READABLE_STRING_8
headers: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8]
response: HTTP_CLIENT_RESPONSE
-- Execute the request and return the response.
-- note: two consecutive calls will trigger two executions!
deferred
end
feature {HTTP_CLIENT_SESSION} -- Execution
import (ctx: HTTP_CLIENT_REQUEST_CONTEXT)
@@ -67,10 +75,6 @@ feature {HTTP_CLIENT_SESSION} -- Execution
end
end
execute: HTTP_CLIENT_RESPONSE
deferred
end
feature -- Authentication
auth_type: STRING
@@ -220,7 +224,7 @@ feature {NONE} -- Utilities: encoding
end
note
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software