Added simple HTTP client.

For now the implementation is using Eiffel cURL library.
It requires Eiffel cURL coming with next EiffelStudio 7.0 (or from eiffelstudio's repo from rev#87244 )
This commit is contained in:
Jocelyn Fiat
2011-09-20 16:55:44 +02:00
parent b3ef7c846b
commit c2f7c198e0
10 changed files with 835 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
note
description : "Objects that ..."
author : "$Author$"
date : "$Date$"
revision : "$Revision$"
class
HTTP_CLIENT_RESPONSE
create
make
feature {NONE} -- Initialization
make
-- Initialize `Current'.
do
status := 200
raw_headers := ""
end
feature -- Status
feature -- Access
status: INTEGER assign set_status
raw_headers: READABLE_STRING_8
headers: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8]
local
tb: like internal_headers
do
tb := internal_headers
if tb = Void then
create tb.make (3)
internal_headers := tb
end
Result := tb
end
body: detachable READABLE_STRING_8 assign set_body
feature -- Change
set_status (s: INTEGER)
do
status := s
end
set_body (s: like body)
do
body := s
end
feature {NONE} -- Implementation
internal_headers: detachable like headers
end