HttpConnection.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// Qore HttpConnection class definition
/* HttpConnection.qc Copyright 2016 - 2020 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
namespace ConnectionProvider {
class HttpConnection : public AbstractConnection {
public:
const Options = {
"assume_encoding": True,
"error_passthru": True,
"http_version": True,
"max_redirects": True,
"proxy": True,
"timeout": True,
"connect_timeout": True,
"redirect_passthru": True,
"ssl_cert_path": True,
"ssl_key_password": True,
"ssl_key_path": True,
"ssl_verify_cert": True,
};
const DefaultOptions = {
"timeout": 45s,
"connect_timeout": 45s,
};
const OptionList = Options.keys();
deprecated
constructor(string name, string desc, string url, bool monitor, *hash<auto> opts, hash<auto> urlh)
;
constructor(string name, string desc, string url, hash<auto> attributes = {}, hash<auto> options = {})
;
protected:
Qore::HTTPClient getImpl(bool connect = True, *hash rtopts);
public:
hash<auto> getOptions();
*hash<auto> getDefaultOptions();
string getType();
deprecated
static HttpConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh);
};
}; // ConnectionProvider namespace
ConnectionProvider
the ConnectionProvider namespace. All classes used in the ConnectionProvider module should be inside ...
Definition: AbstractConnection.qc.dox.h:27
Qore::HTTPClient
ConnectionProvider::AbstractConnection
abstract base class for connections
Definition: AbstractConnection.qc.dox.h:31
ConnectionProvider::AbstractConnection::name
string name
connection name
Definition: AbstractConnection.qc.dox.h:35
ConnectionProvider::HttpConnection::make
static deprecated HttpConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
DEPRECATED: static constructor.
ConnectionProvider::HttpConnection::getDefaultOptions
*hash< auto > getDefaultOptions()
returns default options
ConnectionProvider::HttpConnection::DefaultOptions
const DefaultOptions
HttpConnection default options.
Definition: HttpConnection.qc.dox.h:68
ConnectionProvider::AbstractConnection::desc
string desc
connection description
Definition: AbstractConnection.qc.dox.h:38
True
const True
ConnectionProvider::HttpConnection::Options
const Options
HttpConnection object connection options.
Definition: HttpConnection.qc.dox.h:52
ConnectionProvider::AbstractConnection::opts
*hash< auto > opts
connection options
Definition: AbstractConnection.qc.dox.h:50
ConnectionProvider::HttpConnection::getType
string getType()
returns "http"
ConnectionProvider::AbstractConnection::urlh
hash< auto > urlh
broken down URL hash (as returned by Qore::parse_url())
Definition: AbstractConnection.qc.dox.h:53
ConnectionProvider::HttpConnection::getOptions
hash< auto > getOptions()
gets options
hash
hash< auto > hash(object obj)
ConnectionProvider::AbstractConnection::url
string url
connection URL (potentially with password info)
Definition: AbstractConnection.qc.dox.h:41
ConnectionProvider::AbstractConnection::monitor
bool monitor
monitoring flag
Definition: AbstractConnection.qc.dox.h:65
ConnectionProvider::HttpConnection
class for HTTP connections; returns Qore::HTTPClient objects
Definition: HttpConnection.qc.dox.h:48
ConnectionProvider::HttpConnection::getImpl
Qore::HTTPClient getImpl(bool connect=True, *hash rtopts)
returns an Qore::HTTPClient object
ConnectionProvider::HttpConnection::constructor
deprecated constructor(string name, string desc, string url, bool monitor, *hash< auto > opts, hash< auto > urlh)
DEPRECATED: creates the HttpConnection object.