Qore Programming Language Reference Manual: lib/QC_HTTPClient.dox.h Source File

Qore Programming Language Reference Manual 0.8.11

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

All Classes Namespaces Functions Variables Groups Pages
QC_HTTPClient.dox.h
1 namespace Qore {
4
141 class HTTPClient : public Socket {
142
143 public:
145
150 nothing clearProxyURL();
151
152 public:
154
161 nothing clearProxyUserPassword();
162
163 public:
165
174 clearStats();
175
176 public:
178
185 nothing clearUserPassword();
186
187 public:
189
198 nothing clearWarningQueue();
199
200 public:
202
216 nothing connect();
217
218 public:
220
244 constructor(hash opts);
245
246 public:
248
253 constructor();
254
255 public:
257
259 copy();
260
261 public:
263
268 destructor();
269
270 public:
272
277 nothing disconnect();
278
279 public:
281
313 *string get(string path, *hash headers, *reference info);
314
315 public:
317
327 int getConnectTimeout();
328
329 public:
331
341 *string getConnectionPath();
342
343 public:
345
355 string getDefaultPath();
356
357 public:
359
369 string getEncoding();
370
371 public:
373
383 string getHTTPVersion();
384
385 public:
387
397 int getMaxRedirects();
398
399 public:
401
411 bool getNoDelay();
412
413 public:
415
425 *string getProxyURL();
426
427 public:
429
439 int getTimeout();
440
441 public:
443
453 *string getURL();
454
455 public:
457
478 hash getUsageInfo();
479
480 public:
482
510 hash head(string path, *hash headers, *reference info);
511
512 public:
514
524 bool isConnected();
525
526 public:
528
538 bool isProxySecure();
539
540 public:
542
553 bool isSecure();
554
555 public:
557
589 *string post(string path, string body, *hash headers, *reference info);
590
591 public:
593
624 *string post(string path, *binary body, *hash headers, *reference info);
625
626 public:
628
658 hash send(string body, string method, *string path, *hash headers, softbool getbody = False, *reference info);
659
660 public:
662
691 hash send(*binary body, string method, *string path, *hash headers, softbool getbody = False, *reference info);
692
693 public:
695
738 nothing sendWithCallbacks(code scb, code rcb, string method, *string path, *hash headers, timeout timeout_ms = 0, softbool getbody = False, *reference info);
739
740 public:
742
781 nothing sendWithRecvCallback(code rcb, string body, string method, *string path, *hash headers, timeout timeout_ms = 0, softbool getbody = False, *reference info);
782
783 public:
785
824 nothing sendWithRecvCallback(code rcb, *binary body, string method, *string path, *hash headers, timeout timeout_ms = 0, softbool getbody = False, *reference info);
825
826 public:
828
863 hash sendWithSendCallback(code scb, string method, *string path, *hash headers, timeout timeout_ms = 0, softbool getbody = False, *reference info);
864
865 public:
867
874 nothing setConnectTimeout(timeout timeout_ms = -1);
875
876 public:
878
885 nothing setDefaultPath(*string path);
886
887 public:
889
896 nothing setEncoding(string encoding);
897
898 public:
900
905 nothing setEventQueue();
906
907 public:
909
920 nothing setEventQueue(Qore::Thread::Queue queue);
921
922 public:
924
933 nothing setHTTPVersion(string ver);
934
935 public:
937
946 nothing setMaxRedirects(softint mr = 0);
947
948 public:
950
967 int setNoDelay(softbool b = True);
968
969 public:
971
983 setPersistent();
984
985 public:
987
994 nothing setProxySecure(softbool b = True);
995
996 public:
998
1005 nothing setProxyURL();
1006
1007 public:
1009
1021 nothing setProxyURL(string url);
1022
1023 public:
1025
1035 nothing setProxyUserPassword(string user, string pass);
1036
1037 public:
1039
1050 nothing setProxyUserPassword();
1051
1052 public:
1054
1065 nothing setSecure(softbool secure = True);
1066
1067 public:
1069
1076 nothing setTimeout(timeout timeout_ms = 0);
1077
1078 public:
1080
1096 setURL(string url);
1097
1098 public:
1100
1110 nothing setUserPassword(string user, string pass);
1111
1112 public:
1114
1125 nothing setUserPassword();
1126
1127 public:
1129
1159 nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, any arg, timeout min_ms = 1s);
1160 };
1161 };
Qore::HTTPClient::getUsageInfo
hash getUsageInfo()
Returns performance statistics for the socket.
Qore::HTTPClient::setWarningQueue
nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, any arg, timeout min_ms=1s)
Sets a Queue object to receive socket warnings.
Qore::HTTPClient::sendWithCallbacks
nothing sendWithCallbacks(code scb, code rcb, string method, *string path, *hash headers, timeout timeout_ms=0, softbool getbody=False, *reference info)
Sends an HTTP request with the specified method and chunked message body as given by a send callback;...
Qore::HTTPClient::getNoDelay
bool getNoDelay()
Returns the TCP_NODELAY setting for the HTTPClient object.
Qore::HTTPClient::setEncoding
nothing setEncoding(string encoding)
Sets the string encoding for the object; any strings deserialized with this object will be tagged wit...
Qore::HTTPClient::setDefaultPath
nothing setDefaultPath(*string path)
Sets the default path used by the object if no path is set in the URL.
Qore::Socket
The Socket class allows Qore programs safe access to network sockets.
Definition: QC_Socket.dox.h:122
Qore::HTTPClient::getEncoding
string getEncoding()
Returns the character encoding used for the object.
Qore::HTTPClient::clearWarningQueue
nothing clearWarningQueue()
Removes any warning Queue object from the Socket.
Qore::HTTPClient::setMaxRedirects
nothing setMaxRedirects(softint mr=0)
Updates the setting for the max_redirects value for the object (maximum number of HTTP redirects that...
Qore::True
const True
logical True
Definition: qc_qore.dox.h:94
Qore::HTTPClient::isSecure
bool isSecure()
Returns True if the current connection is encrypted, False if not.
Qore::HTTPClient::isConnected
bool isConnected()
Returns True or False giving the current connection state.
Qore::binary
binary binary()
Always returns an empty binary object (of zero length)
Qore::HTTPClient::setTimeout
nothing setTimeout(timeout timeout_ms=0)
Sets the default I/O timeout value in milliseconds.
Qore::HTTPClient::getTimeout
int getTimeout()
Returns the default I/O timeout as an integer in milliseconds.
Qore::HTTPClient::constructor
constructor()
Creates the HTTPClient object.
Qore::HTTPClient::setSecure
nothing setSecure(softbool secure=True)
Sets the object to make a secure SSL/TLS connection on the next connect if the passed argument is Tru...
Qore::HTTPClient::getHTTPVersion
string getHTTPVersion()
Returns the HTTP protocol version string used in outgoing messages.
Qore::False
const False
logical False
Definition: qc_qore.dox.h:92
Qore::HTTPClient::setProxySecure
nothing setProxySecure(softbool b=True)
Sets the SSL/TLS flag for the next connection to the proxy.
Qore::HTTPClient::clearProxyUserPassword
nothing clearProxyUserPassword()
Clears the username and password for the next proxy connection.
Qore::HTTPClient::setProxyURL
nothing setProxyURL()
Clears the new proxy URL value for the next connection.
Qore::HTTPClient::post
*string post(string path, string body, *hash headers, *reference info)
Sends an HTTP POST request with a message body and returns the message body received as a string or N...
Qore::HTTPClient::setProxyUserPassword
nothing setProxyUserPassword()
Clears the username and password for the next proxy connection.
Qore::HTTPClient::sendWithRecvCallback
nothing sendWithRecvCallback(code rcb, string body, string method, *string path, *hash headers, timeout timeout_ms=0, softbool getbody=False, *reference info)
Sends an HTTP request with the specified method and optional message body; headers and any body recei...
Qore::HTTPClient::head
hash head(string path, *hash headers, *reference info)
Sends an HTTP HEAD request and returns as hash of the headers received.
Qore::HTTPClient::getURL
*string getURL()
Returns the current URL.
Qore::HTTPClient::send
hash send(string body, string method, *string path, *hash headers, softbool getbody=False, *reference info)
Sends an HTTP request with the specified method and optional message body and returns headers and any...
Qore::HTTPClient::copy
copy()
Copying objects of this class is not supported, an exception will be thrown.
Qore::HTTPClient
The HTTPClient class can be used to communicate with HTTP servers with and without TLS/SSL encryption...
Definition: QC_HTTPClient.dox.h:141
Qore::HTTPClient::connect
nothing connect()
Connects to the remote socket; SSL/TLS negotiation is performed if required.
Qore::HTTPClient::clearProxyURL
nothing clearProxyURL()
Clears the new proxy URL value for the next connection.
Qore::HTTPClient::disconnect
nothing disconnect()
Disconnects from the remote socket if a connection is established (otherwise does nothing) ...
Qore::HTTPClient::clearUserPassword
nothing clearUserPassword()
Clears the username and password for the connection.
Qore::HTTPClient::setConnectTimeout
nothing setConnectTimeout(timeout timeout_ms=-1)
Sets the connect timeout in milliseconds.
Qore::HTTPClient::getConnectionPath
*string getConnectionPath()
Returns the current connection path set in the URL.
Qore::HTTPClient::clearStats
clearStats()
Clears performance statistics.
Qore::HTTPClient::getConnectTimeout
int getConnectTimeout()
Returns the connect timeout as an integer in milliseconds.
Qore::HTTPClient::isProxySecure
bool isProxySecure()
Returns the SSL/TLS flag for the next proxy connection.
Qore::HTTPClient::destructor
destructor()
Destroys the HTTPClient object and closes any open connections.
Qore::Thread::Queue
Queue objects provide a blocking, thread-safe message-passing object to Qore programs ...
Definition: QC_Queue.dox.h:13
Qore::HTTPClient::getMaxRedirects
int getMaxRedirects()
Returns the current max_redirects value for the object (the maximum number of HTTP redirects that wil...
Qore::HTTPClient::setEventQueue
nothing setEventQueue()
Clears any Queue object that may be set on the HTTPClient object so that I/O events are no longer cap...
Qore::HTTPClient::setURL
setURL(string url)
Sets a new URL value for the next connection.
Qore::HTTPClient::setPersistent
setPersistent()
temporarily disables implicit reconnections; must be called when the server is already connected ...
Qore::HTTPClient::sendWithSendCallback
hash sendWithSendCallback(code scb, string method, *string path, *hash headers, timeout timeout_ms=0, softbool getbody=False, *reference info)
Sends an HTTP request with the specified method and chunked message body as given by a send callback ...
Qore::HTTPClient::getDefaultPath
string getDefaultPath()
Returns the default path used by the object if no path is set in the URL.
Qore::HTTPClient::setUserPassword
nothing setUserPassword()
Clears the username and password for the connection.
Qore::hash
hash hash(object obj)
Returns a hash of an object's members.
Qore::HTTPClient::getProxyURL
*string getProxyURL()
Returns the current proxy URL as a string or NOTHING if no proxy URL is set.
Qore::HTTPClient::setNoDelay
int setNoDelay(softbool b=True)
Sets the TCP_NODELAY setting for the object.
Qore::HTTPClient::setHTTPVersion
nothing setHTTPVersion(string ver)
Sets the HTTP protocol version string for headers in outgoing messages, allowed values are "1...