http_client: changed some default settings connect_timeout' and timeout' to 0 (never timeout)

Updated comments
This commit is contained in:
2013-11-19 22:07:29 +01:00
parent 1827723ccc
commit ea1c8a23cd
3 changed files with 11 additions and 6 deletions

View File

@@ -111,12 +111,14 @@ feature -- Settings
timeout: INTEGER timeout: INTEGER
-- HTTP transaction timeout in seconds. -- HTTP transaction timeout in seconds.
--| 0 means it nevers timeout
do do
Result := session.timeout Result := session.timeout
end end
connect_timeout: INTEGER connect_timeout: INTEGER
-- HTTP connection timeout in seconds. -- HTTP connection timeout in seconds.
--| 0 means it nevers timeout
do do
Result := session.connect_timeout Result := session.connect_timeout
end end
@@ -218,7 +220,7 @@ feature {NONE} -- Utilities: encoding
end end
note note
copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -5,7 +5,7 @@ note
- headers - headers
- query_parameters - query_parameters
- form parameters - form parameters
- upload_data or upload_filename - upload_data xor upload_filename
And in addition it has And in addition it has
- credentials_required - credentials_required
- proxy - proxy

View File

@@ -36,9 +36,10 @@ feature {NONE} -- Initialization
end end
set_defaults set_defaults
-- Set default settings.
do do
timeout := 5 timeout := 0 --| never timeout
connect_timeout := 1 connect_timeout := 0 --| never timeout
max_redirects := 5 max_redirects := 5
set_basic_auth_type set_basic_auth_type
end end
@@ -149,10 +150,12 @@ feature -- Status report
feature -- Settings feature -- Settings
timeout: INTEGER timeout: INTEGER
-- HTTP transaction timeout in seconds. Defaults to 5 seconds. -- HTTP transaction timeout in seconds.
-- Defaults to 0 second i.e never timeout.
connect_timeout: INTEGER connect_timeout: INTEGER
-- HTTP connection timeout in seconds. Defaults to 1 second. -- HTTP connection timeout in seconds.
-- Defaults to 0 second i.e never timeout.
max_redirects: INTEGER max_redirects: INTEGER
-- Maximum number of times to follow redirects. -- Maximum number of times to follow redirects.