Added is_available on HTTP_CLIENT_SESSION mainly to check if libcurl is available.

This commit is contained in:
Jocelyn Fiat
2012-12-20 18:36:58 +01:00
parent a362e7d9c6
commit e4270b6297
2 changed files with 13 additions and 0 deletions

View File

@@ -120,6 +120,11 @@ feature -- Status report
is_debug: BOOLEAN
-- Produce debug output
is_available: BOOLEAN
-- Is interface usable?
deferred
end
feature -- Settings
timeout: INTEGER

View File

@@ -23,6 +23,14 @@ feature {NONE} -- Initialization
curl_easy.set_curl_function (create {LIBCURL_DEFAULT_FUNCTION}.make)
end
feature -- Status report
is_available: BOOLEAN
-- Is interface usable?
do
Result := curl.is_dynamic_library_exists
end
feature -- Basic operation
get (a_path: READABLE_STRING_8; ctx: detachable HTTP_CLIENT_REQUEST_CONTEXT): HTTP_CLIENT_RESPONSE