Qore ConnectionProvider Module Reference 2.0
Loading...
Searching...
No Matches
HttpConnection.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
2// Qore HttpConnection class definition
3
4/* HttpConnection.qc Copyright 2016 - 2024 Qore Technologies, s.r.o.
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23*/
24
25
27
29namespace ConnectionProvider {
31
60
61public:
63 const ConnectionScheme = ...;
64
65
67 const Options = map {$1: True}, keys ConnectionScheme.options;
68
70
80 constructor(string name, string desc, string url, hash<auto> attributes = {}, hash<auto> options = {}, *Logger logger) ;
81
82
84
101 constructor(hash<auto> config, *hash<auto> attr) ;
102
103
105 string getType();
106
107
109
115 DataProvider::AbstractDataProvider getDataProvider(*hash<auto> constructor_options);
116
117
119
124
125
127
132
133
135
142 Qore::AbstractPollOperation startPollConnect(*Logger::LoggerInterface logger);
143
144
146 *hash<auto> getConnectionOptions(*hash<auto> rtopts);
147
148
150protected:
152public:
153
154
156
159protected:
160 Qore::HTTPClient getImpl(bool connect = True, *hash<auto> rtopts);
161public:
162
163
165protected:
166 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
167public:
168
169};
170}; // ConnectionProvider namespace
string desc
Connection description with markdown formatting.
Definition AbstractConnection.qc.dox.h:82
string url
Connection URL (potentially with password info)
Definition AbstractConnection.qc.dox.h:85
string name
Connection name.
Definition AbstractConnection.qc.dox.h:73
abstract base class for connections
Definition AbstractConnectionWithInfo.qc.dox.h:32
class for HTTP connections; returns Qore::HTTPClient objects
Definition HttpConnection.qc.dox.h:59
bool hasDataProvider()
Returns True, as the connection returns a data provider with the getDataProvider() method.
const ConnectionScheme
Connection entry info.
Definition HttpConnection.qc.dox.h:63
Qore::HTTPClient getImpl(bool connect=True, *hash< auto > rtopts)
returns an Qore::HTTPClient object
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
string getType()
Returns "http".
const Options
HttpConnection object connection options.
Definition HttpConnection.qc.dox.h:67
Qore::AbstractPollOperation startPollConnect(*Logger::LoggerInterface logger)
Called to start the connection if the connection supports the polling API.
constructor(hash< auto > config, *hash< auto > attr)
Creates the HttpConnection object.
bool supportsPollingApi()
returns True, since this connection type supports the Qore Socket-based polling API
DataProvider::AbstractDataProvider getDataProvider(*hash< auto > constructor_options)
Returns an HttpDataProvider object for this connection.
setChildCapabilities()
Sets child data provider capabilities.
constructor(string name, string desc, string url, hash< auto > attributes={}, hash< auto > options={}, *Logger logger)
Creates the HttpConnection object.
*hash< auto > getConnectionOptions(*hash< auto > rtopts)
Returns options for creating a new connection.
The ConnectionProvider namespace.
Definition AbstractConnection.qc.dox.h:28