Qore Programming Language 1.12.4
Loading...
Searching...
No Matches
QoreHTTPClient.h
1/* -*- mode: c++; indent-tabs-mode: nil -*- */
2/*
3 QoreHTTPClient.h
4
5 Qore Programming Language
6
7 Copyright (C) 2006 - 2022 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
45class Queue;
46
48
51public:
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,
67 unsigned size, bool getbody, QoreHashNode* info, ExceptionSink* xsink);
68
69 DLLEXPORT void setEventQueue(Queue* cbq, ExceptionSink* xsink);
70
71 DLLEXPORT void setEventQueue(ExceptionSink* xsink, Queue* q, QoreValue arg, bool with_data);
72};
73
74#endif
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
defines string encoding functions in Qore
Definition: QoreEncoding.h:83
provides a way to communicate with HTTP servers using Qore data structures
Definition: QoreHTTPClient.h:50
virtual DLLEXPORT ~QoreHTTPClient()
destroys the object and frees all associated memory
DLLEXPORT QoreHTTPClient()
creates the QoreHTTPClient object
This is the hash or associative list container type in Qore, dynamically allocated only,...
Definition: QoreHashNode.h:50
provides a way to communicate with HTTP servers using Qore data structures
Definition: QoreHttpClientObject.h:51
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:276