The HTTP interface allows sending and receiving telegrams via URL.
Info: The interface automatically synchronizes with the slowest cycle of the assigned PLC. The telegrams are buffered by the system, so no telegram is lost.
Attention: If an outgoing port is selected for a client, you must wait until the connection is closed. It is therefore recommended to leave the port at the default value 0.
The URL is structured as follows:
http://url:port/variable?wert
With the Function Block HTTP_REQUEST, more details and other methods can be sent. To do this, select the RAW data type for sending.
Tip: You can find a complete Example here.
| Variable | Content |
|---|---|
| method | HTTP method (GET, POST, PUT, DELETE etc.) |
| query | URL parameters after the ? |
| header | Header as array |
| content | POST/PUT content |
| timeout | Send timeout (default 300 seconds) |
| source | Source: SEND=Send, RESP=Response, RECV=Receive |
The response to the request comes via $RESPONSE as a string.
Note: Please note the security of the interface. Data should never be transmitted directly over the Internet. Authentication and encryption via SSL or TLS are missing here.
Normally, older telegrams are discarded when requests follow quickly one after another. If this is not desired, a ! can be added before the URL to execute each request.
Receiving an HTTP request is supported. However, only data in UTF-8 compatible formats. That means binary data is not supported. The technology used supports exclusively HTTP/1.1 over HTTP without TLS/SSL.
Sending and retrieving HTTP requests in UTF-8 formats support both HTTP and HTTPS via TLS/SSL.
To ensure that binary data can be transmitted error-free, the use of BASE64 is recommended.