Update cookies preferences
Promotic

Preconfiguration "REST API - Client - receive or send (GET, POST)"

REST API receive or send data by methods GET or POST

This preconfiguration can be activated when creating a new object (e.g. by "New object ..." in the context menu of the object or by pressing the Insert key after selecting the object) and is included in the group: "/ Communication / Protocols and other communications / REST API".
This preconfiguration can be created in the object: PmaFolder or PmaRoot.

- The preconfiguration creates an object of the PmaFolder type containing PmaFolder, PmaData and PmaPanel objects.
- The preconfiguration is created including the panel (object of the PmaPanel type) is functional also as Web panel.


The PmaFolder object has methods RequestGet, RequestPost and UrlAddr. The "UrlAddr" method returns the predefined URL address of the REST API server.

The "RequestGet" method has the pars and oRcv parameters. It means that the object that calls this method must have a user method "onReceive" created to process the incoming data. The first parameter will contain the requested URL address parameter and the second parameter will be used to send the reference of the calling object (pMe).

The "RequestPost" method has pars and sBody parameters. The first parameter again contains the URL addresss parameters and the second will be used to send the data.

Testing panel PmaPanel allows to run methods RequestGet or RequestPost and display unprocessed received data.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the Pma objects tree.
The maximum name length is 30 characters.
This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and the first character must not be a number.
Default: "REST_Client"
URL address of the serverFull REST API server address without parameters
URL address parameters (POST)Parameters entered in the URL address, for example test=1&area=3
Enabling the test panel for the Web

History:
Pm9.00.20: Created
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.