Qore Programming Language  0.9.3.1
QoreHTTPClient.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3  QoreHTTPClient.h
4 
5  Qore Programming Language
6 
7  Copyright (C) 2006 - 2017 Qore Technologies, s.r.o.
8 
9  Permission is hereby granted, free of charge, to any person obtaining a
10  copy of this software and associated documentation files (the "Software"),
11  to deal in the Software without restriction, including without limitation
12  the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  and/or sell copies of the Software, and to permit persons to whom the
14  Software is furnished to do so, subject to the following conditions:
15 
16  The above copyright notice and this permission notice shall be included in
17  all copies or substantial portions of the Software.
18 
19  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25  DEALINGS IN THE SOFTWARE.
26 
27  Note that the Qore library is released under a choice of three open-source
28  licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
29  information.
30 */
31 
32 /* this file is deprecated; use QoreHttpClientObject instead
33  this class is only kept for ABI compatibility
34 */
35 
36 #ifndef QORE_HTTP_CLIENT_H_
37 #define QORE_HTTP_CLIENT_H_
38 
39 #include <qore/common.h>
40 #include <qore/AbstractPrivateData.h>
41 #include <qore/QoreThreadLock.h>
42 #include <qore/QoreSocket.h>
43 #include <qore/QoreHttpClientObject.h>
44 
45 class Queue;
46 
48 
51 public:
53  DLLEXPORT QoreHTTPClient();
54 
56  DLLEXPORT virtual ~QoreHTTPClient();
57 
58  DLLEXPORT void setDefaultPath(const char* pth);
59  DLLEXPORT void setDefaultHeaderValue(const char* header, const char* val);
60  DLLEXPORT void addProtocol(const char* prot, int port, bool ssl = false);
61 
62  DLLEXPORT int setOptions(const QoreHashNode* opts, ExceptionSink* xsink);
63  DLLEXPORT const QoreEncoding* getEncoding() const;
64 
65  DLLEXPORT int connect(ExceptionSink* xsink);
66  DLLEXPORT QoreHashNode* send(const char* meth, const char* path, const QoreHashNode* headers, const void* data, unsigned size, bool getbody, QoreHashNode* info, ExceptionSink* xsink);
67 
68  DLLEXPORT void setEventQueue(Queue* cbq, ExceptionSink* xsink);
69 };
70 
71 #endif
defines string encoding functions in Qore
Definition: QoreEncoding.h:83
This is the hash or associative list container type in Qore, dynamically allocated only...
Definition: QoreHashNode.h:50
DLLEXPORT QoreHTTPClient()
creates the QoreHTTPClient object
virtual DLLEXPORT ~QoreHTTPClient()
destroys the object and frees all associated memory
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:46
provides a way to communicate with HTTP servers using Qore data structures
Definition: QoreHttpClientObject.h:51
provides a way to communicate with HTTP servers using Qore data structures
Definition: QoreHTTPClient.h:50