Qore jni Module
1.2.0
|
Java wrapper for the Qore::RestClient class in Qore. More...
Public Member Methods | |
RestClient (QoreObject ds) | |
creates the object | |
RestClient (Map< String, Object > opts, boolean do_not_connect) throws Throwable | |
calls the base class HTTPClient constructor and optionally connects to the REST server More... | |
RestClient (Map< String, Object > opts) throws Throwable | |
calls the base class HTTPClient constructor and optionally connects to the REST server More... | |
RestClient () throws Throwable | |
calls the base class HTTPClient constructor and optionally connects to the REST server More... | |
void | setSerialization (String data) throws Throwable |
change the serialization option for the object; see DataSerializationOptions for valid options More... | |
void | setSendEncoding (String enc) throws Throwable |
change the data content encoding (compression) option for the object; see EncodingSupport for valid options More... | |
void | setContentEncoding (String enc) throws Throwable |
sets the request and desired response encoding for the object; see EncodingSupport for valid options More... | |
void | addDefaultHeaders (Map< String, Object > h) throws Throwable |
adds default headers to each request; these headers will be sent in all requests but can be overridden in requests as well More... | |
HashMap< String, Object > | getDefaultHeaders () throws Throwable |
returns the hash of default headers to sent in all requests More... | |
String | getSendEncoding () throws Throwable |
returns the current data content encoding (compression) object or null if no encoding option is set; see EncodingSupport for valid options More... | |
String | getSerialization () throws Throwable |
returns the current data serialization format currently in effect for the object (see DataSerializationOptions for possible values) More... | |
HashMap< String, Object > | restGet (String path, Map< String, Object > hdr) throws Throwable |
sends an HTTP GET request to the REST server and returns the response More... | |
HashMap< String, Object > | restGet (String path, Object body, Map< String, Object > hdr) throws Throwable |
sends an HTTP GET request to the REST server and returns the response More... | |
HashMap< String, Object > | restGet (String path) throws Throwable |
sends an HTTP GET request to the REST server and returns the response More... | |
HashMap< String, Object > | restPut (String path, Object body, Map< String, Object > hdr) throws Throwable |
sends an HTTP PUT request to the REST server and returns the response More... | |
HashMap< String, Object > | restPut (String path, Object body) throws Throwable |
sends an HTTP PUT request to the REST server and returns the response More... | |
HashMap< String, Object > | restPatch (String path, Object body, Map< String, Object > hdr) throws Throwable |
sends an HTTP PATCH request to the REST server and returns the response More... | |
HashMap< String, Object > | restPatch (String path, Object body) throws Throwable |
sends an HTTP PATCH request to the REST server and returns the response More... | |
HashMap< String, Object > | restPost (String path, Object body, Map< String, Object > hdr) throws Throwable |
sends an HTTP POST request to the REST server and returns the response More... | |
HashMap< String, Object > | restPost (String path, Object body) throws Throwable |
sends an HTTP POST request to the REST server and returns the response More... | |
HashMap< String, Object > | restDel (String path, Object body, Map< String, Object > hdr) throws Throwable |
sends an HTTP DELETE request to the REST server and returns the response More... | |
HashMap< String, Object > | restDel (String path, Object body) throws Throwable |
sends an HTTP DELETE request to the REST server and returns the response More... | |
HashMap< String, Object > | doRequest (String m, String path, Object body, boolean decode_errors, Map< String, Object > hdr) throws Throwable |
sends an HTTP request to the REST server and returns the response More... | |
HashMap< String, Object > | doRequest (String m, String path, Object body, boolean decode_errors) throws Throwable |
sends an HTTP request to the REST server and returns the response More... | |
HashMap< String, Object > | doRequest (String m, String path, Object body) throws Throwable |
sends an HTTP request to the REST server and returns the response More... | |
Public Member Methods inherited from org.qore.lang.HTTPClient | |
HTTPClient (QoreObject ds) | |
creates the object | |
HTTPClient (Map< String, Object > opts) throws Throwable | |
Creates the HTTPClient object based on the option parameter passed. More... | |
void | setHTTPVersion (String ver) throws Throwable |
Sets the HTTP protocol version string for headers in outgoing messages, allowed values are "1.0" and "1.1". More... | |
String | getHTTPVersion () throws Throwable |
Returns the HTTP protocol version string used in outgoing messages. More... | |
void | setSecure (boolean secure) throws Throwable |
Sets the object to make a secure SSL/TLS connection on the next connect if the passed argument is true, or an unencrypted cleartext connection if it is false. More... | |
boolean | isSecure () throws Throwable |
Returns true if the current connection is encrypted, false if not. More... | |
void | connect () throws Throwable |
Connects to the remote socket; SSL/TLS negotiation is performed if required. More... | |
void | disconnect () throws Throwable |
Disconnects from the remote socket if a connection is established (otherwise does nothing) More... | |
HashMap< String, Object > | send (String body, String method, String path, Map< String, Object > headers, boolean getbody) throws Throwable |
Sends an HTTP request with the specified method and optional message body and returns headers and any body received as a response in a hash format. More... | |
HashMap< String, Object > | send (String body, String method, String path, Map< String, Object > headers) throws Throwable |
Sends an HTTP request with the specified method and optional message body and returns headers and any body received as a response in a hash format. More... | |
HashMap< String, Object > | send (String body, String method, String path) throws Throwable |
Sends an HTTP request with the specified method and optional message body and returns headers and any body received as a response in a hash format. More... | |
HashMap< String, Object > | send (String body, String method) throws Throwable |
Sends an HTTP request with the specified method and optional message body and returns headers and any body received as a response in a hash format. More... | |
HashMap< String, Object > | send (byte[] body, String method, String path, Map< String, Object > headers, boolean getbody) throws Throwable |
Sends an HTTP request with the specified method and optional message body and returns headers and any body received as a response in a hash format. More... | |
HashMap< String, Object > | send (byte[] body, String method, String path, Map< String, Object > headers) throws Throwable |
Sends an HTTP request with the specified method and optional message body and returns headers and any body received as a response in a hash format. More... | |
HashMap< String, Object > | send (byte[] body, String method, String path) throws Throwable |
Sends an HTTP request with the specified method and optional message body and returns headers and any body received as a response in a hash format. More... | |
HashMap< String, Object > | send (byte[] body, String method) throws Throwable |
Sends an HTTP request with the specified method and optional message body and returns headers and any body received as a response in a hash format. More... | |
String | get (String path, Map< String, Object > headers) throws Throwable |
Sends an HTTP GET request and returns the message body received as a string or null if no message body is received. More... | |
String | get (String path) throws Throwable |
Sends an HTTP GET request and returns the message body received as a string or null if no message body is received. More... | |
String | head (String path, Map< String, Object > headers) throws Throwable |
Sends an HTTP HEAD request and returns as hash of the headers received. More... | |
String | head (String path) throws Throwable |
Sends an HTTP HEAD request and returns as hash of the headers received. More... | |
String | post (String path, String body, Map< String, Object > headers) throws Throwable |
Sends an HTTP POST request with a message body and returns the message body received as a string or null if no message body is received. More... | |
String | post (String path, String body) throws Throwable |
Sends an HTTP POST request with a message body and returns the message body received as a string or null if no message body is received. More... | |
String | post (String path) throws Throwable |
Sends an HTTP POST request without a message body and returns the response message body received as a string or null if no message body is received. More... | |
String | post (String path, byte[] body, Map< String, Object > headers) throws Throwable |
Sends an HTTP POST request with a message body and returns the message body received as a string or null if no message body is received. More... | |
String | post (String path, byte[] body) throws Throwable |
Sends an HTTP POST request with a message body and returns the message body received as a string or null if no message body is received. More... | |
void | setTimeout (int timeout_ms) throws Throwable |
Sets the default I/O timeout value in milliseconds. More... | |
int | getTimeout () throws Throwable |
Returns the default I/O timeout as an integer in milliseconds. More... | |
void | setEncoding (String encoding) throws Throwable |
Sets the string encoding for the object; any strings deserialized with this object will be tagged with this character encoding. More... | |
String | getEncoding () throws Throwable |
Returns the character encoding used for the object. More... | |
void | setURL (String url) throws Throwable |
Sets a new URL value for the next connection. More... | |
String | getURL () throws Throwable |
Returns the current URL. More... | |
void | setProxyURL () throws Throwable |
Clears the new proxy URL value for the next connection. More... | |
void | setProxyURL (String url) throws Throwable |
Sets a new proxy URL value for the next connection. More... | |
String | getProxyURL () throws Throwable |
Returns the current proxy URL as a string or null if no proxy URL is set. More... | |
void | clearProxyURL () throws Throwable |
Clears the new proxy URL value for the next connection. More... | |
void | setProxySecure (boolean b) throws Throwable |
Sets the SSL/TLS flag for the next connection to the proxy. More... | |
boolean | isProxySecure () throws Throwable |
Returns the SSL/TLS flag for the next proxy connection. More... | |
void | setMaxRedirects (int mr) throws Throwable |
Updates the setting for the max_redirects value for the object (maximum number of HTTP redirects that will be processed before an exception is raised) More... | |
int | getMaxRedirects () throws Throwable |
Returns the current max_redirects value for the object (the maximum number of HTTP redirects that will be processed before an exception is raised) More... | |
void | setConnectTimeout (int timeout_ms) throws Throwable |
Sets the connect timeout in milliseconds. More... | |
int | getConnectTimeout () throws Throwable |
Returns the connect timeout as an integer in milliseconds. More... | |
int | setNoDelay (boolean b) throws Throwable |
Sets the TCP_NODELAY setting for the object. More... | |
boolean | getNoDelay () throws Throwable |
Returns the TCP_NODELAY setting for the HTTPClient object. More... | |
boolean | isConnected () throws Throwable |
Returns true or false giving the current connection state. More... | |
void | setUserPassword (String user, String pass) throws Throwable |
Sets the username and password for the connection; call after HTTPClient::setURL() More... | |
void | setUserPassword () throws Throwable |
Clears the username and password for the connection. More... | |
void | clearUserPassword () throws Throwable |
Clears the username and password for the connection. More... | |
void | setProxyUserPassword (String user, String pass) throws Throwable |
Sets the username and password for the connection to the proxy; call after HTTPClient::setProxyURL() More... | |
void | setProxyUserPassword () throws Throwable |
Clears the username and password for the next proxy connection. More... | |
void | clearProxyUserPassword () throws Throwable |
Clears the username and password for the next proxy connection. More... | |
void | setDefaultPath (String path) throws Throwable |
Sets the default path used by the object if no path is set in the URL. More... | |
String | getDefaultPath () throws Throwable |
Returns the default path used by the object if no path is set in the URL. More... | |
String | getConnectionPath () throws Throwable |
Returns the current connection path set in the URL. More... | |
void | setConnectionPath (String uri_path) throws Throwable |
Overrides any connection path set in the URL. More... | |
void | setConnectionPath () throws Throwable |
Overrides any connection path set in the URL. More... | |
HashMap< String, Object > | getUsageInfo () throws Throwable |
Returns performance statistics for the socket. More... | |
void | clearStats () throws Throwable |
Clears performance statistics. More... | |
void | setPersistent () throws Throwable |
temporarily disables implicit reconnections; must be called when the server is already connected More... | |
boolean | setErrorPassthru (boolean set) throws Throwable |
set the error passthru status More... | |
boolean | setErrorPassthru () throws Throwable |
set the error passthru status More... | |
boolean | getErrorPassthru () throws Throwable |
get the error passthru status More... | |
boolean | setRedirectPassthru (boolean set) throws Throwable |
set the redirect passthru status More... | |
boolean | setRedirectPassthru () throws Throwable |
set the redirect passthru status More... | |
boolean | getRedirectPassthru () throws Throwable |
get the redirect passthru status More... | |
boolean | setEncodingPassthru (boolean set) throws Throwable |
set the encoding passthru status More... | |
boolean | setEncodingPassthru () throws Throwable |
set the encoding passthru status More... | |
boolean | getEncodingPassthru () throws Throwable |
get the encoding passthru status More... | |
String | getHostHeaderValue () throws Throwable |
returns the Host header value for this object More... | |
Public Member Methods inherited from org.qore.jni.QoreObjectWrapper | |
QoreObjectWrapper (QoreObject obj) | |
creates the wrapper object with the Qore object | |
void | release () |
releases the Qore object; do not call any further methods on the object after this call | |
QoreObject | getQoreObject () |
returns the Qore object | |
String | className () |
returns the class name for the Qore object | |
boolean | instanceOf (String class_name) |
returns true if the object is an instance of the given class | |
Additional Inherited Members | |
Private Attributes inherited from org.qore.jni.QoreObjectWrapper | |
QoreObject | obj |
the wrapper Qore object | |
Java wrapper for the Qore::RestClient class in Qore.
|
inline |
calls the base class HTTPClient constructor and optionally connects to the REST server
opts | valid options are:
|
do_not_connect | if False (the default), then a connection will be immediately established to the remote server |
RESTCLIENT-ERROR | invalid option passed to constructor, unsupported data serialization, etc |
|
inline |
calls the base class HTTPClient constructor and optionally connects to the REST server
opts | valid options are:
|
RESTCLIENT-ERROR | invalid option passed to constructor, unsupported data serialization, etc |
|
inline |
calls the base class HTTPClient constructor and optionally connects to the REST server
|
inline |
adds default headers to each request; these headers will be sent in all requests but can be overridden in requests as well
h | a hash of headers to add to the default headers to send on each request |
|
inline |
sends an HTTP request to the REST server and returns the response
m | the HTTP method to be used; case is ignored (if not a valid method an HTTP-CLIENT-METHOD-ERROR exception is raised) |
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
HTTP-CLIENT-METHOD-ERROR | invalid HTTP method argument passed |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
REST-ACCEPT-ERROR | if the message has a validator that indicates that the response message only supports types not supported by the current options or environment |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP request to the REST server and returns the response
m | the HTTP method to be used; case is ignored (if not a valid method an HTTP-CLIENT-METHOD-ERROR exception is raised) |
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
decode_errors | decode the message body with HTTP error responses and throw an exception based on the message body |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
HTTP-CLIENT-METHOD-ERROR | invalid HTTP method argument passed |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
REST-ACCEPT-ERROR | if the message has a validator that indicates that the response message only supports types not supported by the current options or environment |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP request to the REST server and returns the response
m | the HTTP method to be used; case is ignored (if not a valid method an HTTP-CLIENT-METHOD-ERROR exception is raised) |
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
decode_errors | decode the message body with HTTP error responses and throw an exception based on the message body |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
HTTP-CLIENT-METHOD-ERROR | invalid HTTP method argument passed |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
REST-ACCEPT-ERROR | if the message has a validator that indicates that the response message only supports types not supported by the current options or environment |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
returns the hash of default headers to sent in all requests
|
inline |
returns the current data content encoding (compression) object or null if no encoding option is set; see EncodingSupport for valid options
|
inline |
returns the current data serialization format currently in effect for the object (see DataSerializationOptions for possible values)
|
inline |
sends an HTTP DELETE
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP DELETE
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP GET
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP GET
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP GET
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor(); note that sending a message body with an HTTP GET request is not standards compliant; see httpclient_get_with_body for more information; for maximum compatibility, use null for this argument when calling this method |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP PATCH
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP PATCH
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP POST
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP POST
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP PUT
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sends an HTTP PUT
request to the REST server and returns the response
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized according to the serialization rules set in RestClient::constructor() |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
keyDESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
REST-RESPONSE-ERROR | if this exception is thrown by the Qore::HTTPClient::send() call in case of an HTTP response code < 100 or >= 300, the message body is still deserialized if possible and the response information can be retrieved in the info hash output keys as follows:
error_passthru option is set to true |
Other exceptions can be thrown by the Qore::HTTPClient::send() call used to make the HTTP request.
|
inline |
sets the request and desired response encoding for the object; see EncodingSupport for valid options
enc | the data content encoding (compression) option for requests and the desired response content encoding for the object; see EncodingSupport for valid options; if the value "auto" is passed then "gzip" encoding is used for outgoing requests and requested for responses |
RESTCLIENT-ERROR | invalid or unsupported data content encoding / compression option |
|
inline |
change the data content encoding (compression) option for the object; see EncodingSupport for valid options
The default is to send requests unencoded/uncompressed.
enc | the data content encoding (compression) option for the object; see EncodingSupport for valid options; if the value "auto" is passed then "gzip" encoding is used |
RESTCLIENT-ERROR | invalid or unsupported data content encoding / compression option |
|
inline |
change the serialization option for the object; see DataSerializationOptions for valid options
data | the serialization option for the object; see DataSerializationOptions for valid options |
RESTCLIENT-ERROR | invalid or unsupported serialization option |