Skip to main content

Library: Web Client SL

The Web Client SL library contains function blocks for communicating with a web server via httphttps.

  • When using http-GET, data can be requested from a web server.

  • When using http-POST and http-PUT, data can be sent from the controller to a web server.

  • When using http-DELETE, data can be deleted on a web server.

  • With http-HEAD the http header can be requested.

The HTTP header of a request can be extended as much as necessary. In addition, function blocks for HTTP-basic authentication and authentication via OAuth (version 1a and 2) are included.

Library function blocks

  • WebClient

    Function block to send HTTP or HTTPS requests

    The Web Client SL Example.project sample project shows how to use of this function block.

  • BasicAuthWebClient

    Function block with HTTP basic authentication to send HTTP or HTTPS requests

  • OAuth1WebClient

    Function block with OAuth authentication (version 1a) to send HTTP or HTTPS requests

  • OAuth2WebClient

    Function block with OAuth authentication (version 2) to send HTTP or HTTPS requests

  • DigestAuthWebClient

    Function block with digest access authentication to send HTTP or HTTPS requests

  • Functions for encoding/decoding

    • BASE64_DECODE: Base64 decoder for STRING

    • BASE64_ENCODE: Base64 encoder for STRING

    • URL_ENCODE_WSTRING: URL encoder for WSTRING

    • URL_ENCODE_STRING: URL encoder for STRING

Tip

See the example: Using the Web Client SL Library.