Qore Programming Language Reference Manual 0.8.8

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

All Classes Namespaces Functions Variables Groups Pages
QC_HTTPClient.dox.h
1 namespace Qore {
4
139 class HTTPClient : public Socket {
140
141 public:
143
148 nothing clearProxyURL();
149
150 public:
152
159 nothing clearProxyUserPassword();
160
161 public:
163
170 nothing clearUserPassword();
171
172 public:
174
188 nothing connect();
189
190 public:
192
214 constructor(hash opts);
215
216 public:
218
223 constructor();
224
225 public:
227
229 copy();
230
231 public:
233
238 destructor();
239
240 public:
242
247 nothing disconnect();
248
249 public:
251
283 *string get(string path, *hash headers, *reference info);
284
285 public:
287
297 int getConnectTimeout();
298
299 public:
301
311 *string getConnectionPath();
312
313 public:
315
325 string getDefaultPath();
326
327 public:
329
339 string getEncoding();
340
341 public:
343
353 string getHTTPVersion();
354
355 public:
357
367 int getMaxRedirects();
368
369 public:
371
381 bool getNoDelay();
382
383 public:
385
395 *string getProxyURL();
396
397 public:
399
409 int getTimeout();
410
411 public:
413
423 *string getURL();
424
425 public:
427
455 hash head(string path, *hash headers, *reference info);
456
457 public:
459
469 bool isConnected();
470
471 public:
473
483 bool isProxySecure();
484
485 public:
487
498 bool isSecure();
499
500 public:
502
534 *string post(string path, string body, *hash headers, *reference info);
535
536 public:
538
569 *string post(string path, *binary body, *hash headers, *reference info);
570
571 public:
573
603 hash send(string body, string method, *string path, *hash headers, softbool getbody = False, *reference info);
604
605 public:
607
636 hash send(*binary body, string method, *string path, *hash headers, softbool getbody = False, *reference info);
637
638 public:
640
647 nothing setConnectTimeout(timeout timeout_ms = -1);
648
649 public:
651
658 nothing setDefaultPath(*string path);
659
660 public:
662
669 nothing setEncoding(string encoding);
670
671 public:
673
678 nothing setEventQueue();
679
680 public:
682
693 nothing setEventQueue(Qore::Thread::Queue queue);
694
695 public:
697
706 nothing setHTTPVersion(string ver);
707
708 public:
710
719 nothing setMaxRedirects(softint mr = 0);
720
721 public:
723
740 int setNoDelay(softbool b = True);
741
742 public:
744
751 nothing setProxySecure(softbool b = True);
752
753 public:
755
762 nothing setProxyURL();
763
764 public:
766
776 nothing setProxyURL(string url);
777
778 public:
780
790 nothing setProxyUserPassword(string user, string pass);
791
792 public:
794
805 nothing setProxyUserPassword();
806
807 public:
809
820 nothing setSecure(softbool secure = True);
821
822 public:
824
831 nothing setTimeout(timeout timeout_ms = 0);
832
833 public:
835
849 setURL(string url);
850
851 public:
853
863 nothing setUserPassword(string user, string pass);
864
865 public:
867
878 nothing setUserPassword();
879 };
880 };
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::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::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:139
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::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::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&#39;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 &quot;1...