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

HttpRequest receive or send data by GET or POST methods
This preconfiguration can be activated when creating a new object (e.g. by "New object" in the local object menu or by pressing the Insert key after selecting the object) and is included in the group: " / Communication / XML, JSON, CSV, text files".

This preconfiguration can be used with the objects: PmFolder or PmRoot.

- Preconfiguration creates an object of type PmFolder containing PmSequencer and PmPanel objects.
- The preconfiguration is created including the panel (PmPanel object) functionality as a Web panel.
The PmFolder object has the RequestGet and RequestPost methods for initialization of the communication. Each of this methods calls the Add method of the PmSequencer object, where in the second prarameter the communication method is defined (GET or POST) and in the third parameter the URL address of the 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 PmPanel allows to run methods RequestGet or RequestPost and display unprocessed received data.
The PmSequencer object is configured in order to have each communication running outside the main working thread of the application PROMOTIC. In the onStep event, there is an ActiveX object "Microsoft.XMLHTTP" 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 application object tree. This is a system name and must not contain diacritics, empty string, spaces and the first character must not be a number.

Default: "HttpRequest"

Data receive (GET)
URL address for receiving 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)
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 graphic panel used for communication testing and displaying of received data
PROMOTIC 8.3.20 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice