Update cookies preferences
Promotic

Preconfiguration "HttpRequest - Receive or send (GET, POST)"

HttpRequest 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).
 
This preconfiguration is included in the "/ Communication / Protocols and other communications / HTTP - XML, JSON, CSV, SOAP, text" group.
 
This preconfiguration can be created in the PmaFolder, PmaRoot or PmaPrototype object.

- The preconfiguration creates an object of the PmaFolder type containing PmaSequencer 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 the RequestGet and RequestPost methods for initialization of the communication. Each of this methods calls the Add method of the PmaSequencer object, where in the second prarameter the communication method is defined (GET or POST) and in the third parameter the URL address of data source is defined and in the fourth parameter (for the POST method) there is the send data content. Additional methods ReplyXml, ReplyTxt and ReplyCsv are used for processing the received data based on reply type.

Testing panel PmaPanel allows to run methods RequestGet or RequestPost and display unprocessed received data.

The PmaSequencer object is configured in order to have each communication running outside the main working thread of the PROMOTIC application. In the onStep event, there is an ActiveX Microsoft.XMLHTTP object that gets the corresponding parameters for synchronous mode communication by the open method. The "send" method follows and receives or sends the data. The received data can be then processed as needed. The transmission is terminated by the abort method.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the Pma object 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 first character must not be a number.
Default: "HttpRequest"
Data receive (GET)
URL address to receive data (GET)Network or local address of data source, for example in the form: http://localhost/data/exam.xml
Data processing method
XML - parser (default)
Text
CSV - file
Data sending (POST)
URL address for sending data (POST)Network or local address of data source, for example in the form: http://localhost/data/exam.xml
Create test panelCreates panel used for communication testing and displaying of received data

History:
Pm8.00.05: Created
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

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