Home

mlamp
There is a newer version of this page. You can find it here.

Download project

HTTP Client Example

With the function block "HTTP Client", http requests, as well as the resulting responses,
can be exchanged between a CODESYS controller and a web server.

Product description

The CODESYS software package includes a library with a function block for communicating
with a web server via HTTP.

  • When using http-GET, data is requested from a web server.
  • When using http-POST or http-PUT, data is submitted from the controller to a web server.
  • When using http-DELETE, data is deleted on a web server.
  • When using http-HEAD, http-Header is requested from a web server.

The HTTP header of a request can be extended without any restrictions. The library is included
as source code in the CODESYS package.

More information

Function block "HTTPClient"
Function block for sending http requests. The sample project HTTPClient.project illustrates
how this function block is used.

Function "URLDecoder"
Function for coding and decoding URLs (percent encoding).

Screenshot thumbnail
HTTP Client visualization in the CODESYS Development System