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:
60
library/client/http_client/src/http_client_response.e
Normal file
60
library/client/http_client/src/http_client_response.e
Normal 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
|
||||
Reference in New Issue
Block a user