Preconfiguration "REST API - Server - receive or send (GET, POST)"
The
REST API server to receive and process or send data by methods
POST and
GET
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 / REST API" group.
This preconfiguration can be created in the
PmaFolder,
PmaRoot or
PmaPrototype object.
- The preconfiguration is created including the panel (object of the
PmaPanel type) is functional also as
Web panel.
The
PmaWebDir object has the events
onPageAction and
onPageModify.
The
onPageModify event handles sending data to the client based on the requested page and also the parameter specified in the URL address. The preconfiguration has an example ready there to send data if the client requests the page "test.htm" with the
"test=1" or "test=2" parameter.
The
onPageAction event handles receiving and processing data from a client by the "POST" method. The preconfiguration has an example to receive data if the client requests the page "test.htm" with the
"test=1" or "test=2" parameter. The
GET,
PUT and
DELETE methods are not handled here.
These configurators can be set before the preconfiguration is created:
The name of created object | Name 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: "REST_Server" |
|
Port number | Port number on which this server will expect incoming messages |
Enabling the test panel for the Web | |
---|