313 *
string get(
string path, *
hash headers, *reference info);
589 *
string post(
string path,
string body, *
hash headers, *reference info);
624 *
string post(
string path, *
binary body, *
hash headers, *reference info);
658 hash send(
string body,
string method, *
string path, *
hash headers, softbool getbody =
False, *reference info);
691 hash send(*
binary body,
string method, *
string path, *
hash headers, softbool getbody =
False, *reference info);
971 nothing
setWarningQueue(
int warning_ms,
int warning_bs, Queue queue, any arg, timeout min_ms = 1s);
hash getUsageInfo()
Returns performance statistics for the socket.
nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, any arg, timeout min_ms=1s)
Sets a Queue object to receive socket warnings.
bool getNoDelay()
Returns the TCP_NODELAY setting for the HTTPClient object.
nothing setEncoding(string encoding)
Sets the string encoding for the object; any strings deserialized with this object will be tagged wit...
nothing setDefaultPath(*string path)
Sets the default path used by the object if no path is set in the URL.
The Socket class allows Qore programs safe access to network sockets.
Definition: QC_Socket.dox.h:122
string getEncoding()
Returns the character encoding used for the object.
nothing clearWarningQueue()
Removes any warning Queue object from the Socket.
nothing setMaxRedirects(softint mr=0)
Updates the setting for the max_redirects value for the object (maximum number of HTTP redirects that...
const True
logical True
Definition: qc_qore.dox.h:94
bool isSecure()
Returns True if the current connection is encrypted, False if not.
bool isConnected()
Returns True or False giving the current connection state.
binary binary()
Always returns an empty binary object (of zero length)
nothing setTimeout(timeout timeout_ms=0)
Sets the default I/O timeout value in milliseconds.
int getTimeout()
Returns the default I/O timeout as an integer in milliseconds.
constructor()
Creates the HTTPClient object.
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...
string getHTTPVersion()
Returns the HTTP protocol version string used in outgoing messages.
const False
logical False
Definition: qc_qore.dox.h:92
nothing setProxySecure(softbool b=True)
Sets the SSL/TLS flag for the next connection to the proxy.
nothing clearProxyUserPassword()
Clears the username and password for the next proxy connection.
nothing setProxyURL()
Clears the new proxy URL value for the next connection.
*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...
nothing setProxyUserPassword()
Clears the username and password for the next proxy connection.
hash head(string path, *hash headers, *reference info)
Sends an HTTP HEAD request and returns as hash of the headers received.
*string getURL()
Returns the current URL.
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...
copy()
Copying objects of this class is not supported, an exception will be thrown.
The HTTPClient class can be used to communicate with HTTP servers with and without TLS/SSL encryption...
Definition: QC_HTTPClient.dox.h:141
nothing connect()
Connects to the remote socket; SSL/TLS negotiation is performed if required.
nothing clearProxyURL()
Clears the new proxy URL value for the next connection.
nothing disconnect()
Disconnects from the remote socket if a connection is established (otherwise does nothing) ...
nothing clearUserPassword()
Clears the username and password for the connection.
nothing setConnectTimeout(timeout timeout_ms=-1)
Sets the connect timeout in milliseconds.
*string getConnectionPath()
Returns the current connection path set in the URL.
clearStats()
Clears performance statistics.
int getConnectTimeout()
Returns the connect timeout as an integer in milliseconds.
bool isProxySecure()
Returns the SSL/TLS flag for the next proxy connection.
destructor()
Destroys the HTTPClient object and closes any open connections.
Queue objects provide a blocking, thread-safe message-passing object to Qore programs ...
Definition: QC_Queue.dox.h:13
int getMaxRedirects()
Returns the current max_redirects value for the object (the maximum number of HTTP redirects that wil...
nothing setEventQueue()
Clears any Queue object that may be set on the HTTPClient object so that I/O events are no longer cap...
setURL(string url)
Sets a new URL value for the next connection.
string getDefaultPath()
Returns the default path used by the object if no path is set in the URL.
nothing setUserPassword()
Clears the username and password for the connection.
hash hash(object obj)
Returns a hash of an object's members.
*string getProxyURL()
Returns the current proxy URL as a string or NOTHING if no proxy URL is set.
int setNoDelay(softbool b=True)
Sets the TCP_NODELAY setting for the object.
nothing setHTTPVersion(string ver)
Sets the HTTP protocol version string for headers in outgoing messages, allowed values are "1...