Qorus Integration Engine® Community Edition 6.0.0_dev
Loading...
Searching...
No Matches
OMQ::Client::QorusLocalRestHelper Class Reference

class for local REST API calls More...

Inheritance diagram for OMQ::Client::QorusLocalRestHelper:
[legend]
Collaboration diagram for OMQ::Client::QorusLocalRestHelper:
[legend]

Public Member Methods

auto doRequest (string m, string path, *hash< auto > args)
 makes the REST response and returns the deserialized body More...
 
auto get (string path, *hash< auto > args)
 issues an HTTP GET REST request against the server and returns the deserialized response More...
 
auto put (string path, *hash< auto > args)
 issues an HTTP PUT REST request against the server and returns the deserialized response More...
 
auto post (string path, *hash< auto > args)
 issues an HTTP POST REST request against the server and returns the deserialized response More...
 
auto del (string path, *hash< auto > args)
 issues an HTTP DELETE REST request against the server and returns the deserialized response More...
 
 setEncoding (string enc)
 sets the socket encoding
 

Additional Inherited Members

- Private:Internal Member Methods inherited from OMQ::Client::QorusSystemRestHelper
 constructor (*hash< auto > opts, *softbool do_not_connect)
 Creates the object with the given options. More...
 
 constructor (string name, *softbool do_not_connect)
 creates the object from the given remote connection name More...
 
 constructor (string user, string pwd)
 creates the object pointing to the first local listener for the current instance using the given user and password for connecting More...
 
 setBasePath (string p)
 sets the base path for REST requests
 
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, *reference< bool > down)
 returns a user-friendly error message when errors occur with REST messaging More...
 
bool outputRestErrorMessage (hash< auto > ex, hash< auto > info)
 outputs a user-friendly error string when errors occur with REST messaging More...
 
 autoSetUrl (*hash< auto > opts)
 sets the URL automatically
 
 setInternalUrl (string url)
 Sets internal authentication info.
 
 warning (string fmt)
 prints a warning on the console
 
string getBody (hash< auto > info)
 get the literal HTTP body from the info hash
 
 showRestRequest (hash< auto > info, auto args, *hash< auto > opt)
 outpus the REST request
 
 showRestResponse (hash< auto > info, auto rv, *hash< auto > opt)
 outpus the REST response
 
- Private:Internal Member Methods inherited from OMQ::QorusSystemRestHelperBase
 constructor (*hash< auto > opts, *softbool do_not_connect)
 Creates the object with the given options. More...
 
 setSchema ()
 Sets the REST validator to the latest version of the schema for the Qorus API. More...
 
 setPublicSchema ()
 Sets the REST validator to the latest version of the public schema for the Qorus API. More...
 
abstract private autoSetUrl (*hash< auto > opts)
 sets the URL automatically; must be reimplemented in subclasses
 
 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< auto > > info)
 executes the remote REST call and returns the response More...
 
abstract private nothing warning (string fmt)
 issue a warning on the console (for the client) or in the current log file (for the server) More...
 
auto get (string path, auto args, *hash< auto > hdr, *reference< hash< auto > > 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< auto > > 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< auto > > 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< auto > > 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< auto > > info, softbool decode_errors=True, *hash< auto > hdr)
 sends an HTTP request to the REST server and returns the response More...
 
- Static Private:Internal Member Methods inherited from OMQ::QorusSystemRestHelperBase
static hash< auto > toConfig (hash< auto > info)
 returns a hash of configuration information for the object
 
- Private:Internal Attributes inherited from OMQ::QorusSystemRestHelperBase
const Defaults
 default values for connection options
 
hash conn_opts
 connection params
 
*string api_version
 api version
 
*string name
 connection name if known
 

Detailed Description

class for local REST API calls

Since
Qorus 4.1

Member Function Documentation

◆ del()

auto OMQ::Client::QorusLocalRestHelper::del ( string  path,
*hash< auto >  args 
)

issues an HTTP DELETE REST request against the server and returns the deserialized response

Parameters
paththe URI path for the request
argsany arguments to the REST request
Returns
the deserialized response body

◆ doRequest()

auto OMQ::Client::QorusLocalRestHelper::doRequest ( string  m,
string  path,
*hash< auto >  args 
)

makes the REST response and returns the deserialized body

Parameters
mthe HTTP method for the request (ex: "GET")
paththe URI path for the request
argsany arguments to the REST request
Returns
the deserialized response body

◆ get()

auto OMQ::Client::QorusLocalRestHelper::get ( string  path,
*hash< auto >  args 
)

issues an HTTP GET REST request against the server and returns the deserialized response

Parameters
paththe URI path for the request
argsany arguments to the REST request
Returns
the deserialized response body

◆ post()

auto OMQ::Client::QorusLocalRestHelper::post ( string  path,
*hash< auto >  args 
)

issues an HTTP POST REST request against the server and returns the deserialized response

Parameters
paththe URI path for the request
argsany arguments to the REST request
Returns
the deserialized response body

◆ put()

auto OMQ::Client::QorusLocalRestHelper::put ( string  path,
*hash< auto >  args 
)

issues an HTTP PUT REST request against the server and returns the deserialized response

Parameters
paththe URI path for the request
argsany arguments to the REST request
Returns
the deserialized response body

The documentation for this class was generated from the following file: