Qorus Integration Engine®
4.1.4.p4_git
|
class to call the system REST API from the client library More...
Public Member Methods | |
constructor (*hash< auto > opts, *softbool do_not_connect) | |
creates the object with the given options; a connection is automatically made unless the do_not_connect argument is False More... | |
constructor (string name, *softbool do_not_connect) | |
creates the object from the given remote connection name; a connection is automatically made unless the do_not_connect argument is False More... | |
private | autoSetUrl (*hash< auto > opts) |
sets the URL automatically | |
private | warning (string fmt) |
prints a warning on the console | |
setBasePath (string p) | |
sets the base path for REST requests | |
private string | getBody (hash< auto > info) |
get the literal HTTP body from the info hash | |
private | showRestRequest (hash< auto > info, auto args, *hash< auto > opt) |
outpus the REST request | |
private | showRestResponse (hash< auto > info, auto rv, *hash< auto > opt) |
outpus the REST response | |
auto | restDo (string m, string path, auto args, *hash< auto > hdr, *hash< auto > opt, *reference< hash< auto >> info) |
makes the REST response and returns the deserialized body More... | |
auto | get (*hash< auto > opt, string path, auto args, *hash< auto > hdr, *reference< hash< auto >> info) |
issues an HTTP GET REST request against the server and returns the deserialized response More... | |
auto | put (*hash< auto > opt, string path, auto args, *hash< auto > hdr, *reference< hash< auto >> info) |
issues an HTTP PUT REST request against the server and returns the deserialized response More... | |
auto | post (*hash< auto > opt, string path, auto args, *hash< auto > hdr, *reference< hash< auto >> info) |
issues an HTTP POST REST request against the server and returns the deserialized response More... | |
auto | del (*hash< auto > opt, string path, auto args, *hash< auto > hdr, *reference< hash< auto >> info) |
issues an HTTP DELETE REST request against the server and returns the deserialized response More... | |
string | getRestErrorMessage (hash< auto > ex, hash< auto > info) |
returns a user-friendly error message when errors occur with REST messaging More... | |
outputRestErrorMessage (hash< auto > ex, hash< auto > info) | |
outputs a user-friendly error string when errors occur with REST messaging More... | |
Public Member Methods inherited from OMQ::QorusSystemRestHelperBase | |
constructor (*hash< auto > opts, *softbool do_not_connect) | |
creates the object with the given options; a connection is automatically made unless the do_not_connect argument is False More... | |
setURL (string url) | |
sets the URL for the object | |
hash< auto > | restDoWithInfo (string m, string path, auto args, *hash< auto > hdr, *hash< auto > opt) |
executes the remote REST call and returns the response More... | |
abstract auto | restDo (string m, string path, auto args, *hash< auto > hdr, *hash< auto > opt, *reference< hash > info) |
executes the remote REST call and returns the response More... | |
auto | get (string path, auto args, *hash< auto > hdr, *reference< hash > info) |
executes a GET call on the remote REST service and returns the response More... | |
hash< auto > | getWithInfo (string path, auto args, *hash< auto > hdr) |
executes a GET call on the remote REST service and returns the response More... | |
auto | put (string path, auto args, *hash< auto > hdr, *reference< hash > info) |
executes a PUT call on the remote REST service and returns the response More... | |
hash< auto > | putWithInfo (string path, auto args, *hash< auto > hdr) |
executes a PUT call on the remote REST service and returns the response More... | |
auto | post (string path, auto args, *hash< auto > hdr, *reference< hash > info) |
executes a POST call on the remote REST service and returns the response More... | |
hash< auto > | postWithInfo (string path, auto args, *hash< auto > hdr) |
executes a POST call on the remote REST service and returns the response More... | |
auto | del (string path, auto args, *hash< auto > hdr, *reference< hash > info) |
executes a DELETE call on the remote REST service and returns the response More... | |
hash< auto > | delWithInfo (string path, auto args, *hash< auto > hdr) |
executes a DELETE call on the remote REST service and returns the response More... | |
hash< auto > | doRequest (string m, string path, auto body, *reference< hash > info, softbool decode_errors=True, *hash< auto > hdr) |
sends an HTTP request to the REST server and returns the response More... | |
Additional Inherited Members | |
Static Public Member Methods inherited from OMQ::QorusSystemRestHelperBase | |
static hash< auto > | toConfig (hash< auto > info) |
returns a hash of configuration information for the object | |
Public Attributes inherited from OMQ::QorusSystemRestHelperBase | |
const | Defaults |
default values for connection options | |
class to call the system REST API from the client library
OMQ::Client::QorusSystemRestHelper::constructor | ( | *hash< auto > | opts, |
*softbool | do_not_connect | ||
) |
creates the object with the given options; a connection is automatically made unless the do_not_connect argument is False
opts | options as follows:
|
do_not_connect | if True, then the object will be created in an unconnected state |
OMQ::Client::QorusSystemRestHelper::constructor | ( | string | name, |
*softbool | do_not_connect | ||
) |
creates the object from the given remote connection name; a connection is automatically made unless the do_not_connect argument is False
name | the remote connection name to use for the connection |
do_not_connect | if True, then the object will be created in an unconnected state |
auto OMQ::Client::QorusSystemRestHelper::del | ( | *hash< auto > | opt, |
string | path, | ||
auto | args, | ||
*hash< auto > | hdr, | ||
*reference< hash< auto >> | info | ||
) |
issues an HTTP DELETE
REST request against the server and returns the deserialized response
opt | output options: |
path | the URI path for the request |
args | any arguments to the REST request |
hdr | a hash of optional HTTP header info to add to the request |
info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|
auto OMQ::Client::QorusSystemRestHelper::get | ( | *hash< auto > | opt, |
string | path, | ||
auto | args, | ||
*hash< auto > | hdr, | ||
*reference< hash< auto >> | info | ||
) |
issues an HTTP GET
REST request against the server and returns the deserialized response
opt | output options: |
path | the URI path for the request |
args | any arguments to the REST request |
hdr | a hash of optional HTTP header info to add to the request |
info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|
string OMQ::Client::QorusSystemRestHelper::getRestErrorMessage | ( | hash< auto > | ex, |
hash< auto > | info | ||
) |
returns a user-friendly error message when errors occur with REST messaging
ex | an exception hash |
info | an output hash from a REST call |
outputs a user-friendly error string when errors occur with REST messaging
ex | an exception hash |
info | an output hash from a REST call |
auto OMQ::Client::QorusSystemRestHelper::post | ( | *hash< auto > | opt, |
string | path, | ||
auto | args, | ||
*hash< auto > | hdr, | ||
*reference< hash< auto >> | info | ||
) |
issues an HTTP POST
REST request against the server and returns the deserialized response
opt | output options: |
path | the URI path for the request |
args | any arguments to the REST request |
hdr | a hash of optional HTTP header info to add to the request |
info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|
auto OMQ::Client::QorusSystemRestHelper::put | ( | *hash< auto > | opt, |
string | path, | ||
auto | args, | ||
*hash< auto > | hdr, | ||
*reference< hash< auto >> | info | ||
) |
issues an HTTP PUT
REST request against the server and returns the deserialized response
opt | output options: |
path | the URI path for the request |
args | any arguments to the REST request |
hdr | a hash of optional HTTP header info to add to the request |
info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|
auto OMQ::Client::QorusSystemRestHelper::restDo | ( | string | m, |
string | path, | ||
auto | args, | ||
*hash< auto > | hdr, | ||
*hash< auto > | opt, | ||
*reference< hash< auto >> | info | ||
) |
makes the REST response and returns the deserialized body
m | the HTTP method for the request (ex: "GET" ) |
path | the URI path for the request |
args | any arguments to the REST request |
hdr | a hash of optional HTTP header info to add to the request |
opt | output options: |
info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request; if present the hash will contain the following keys:
|