0% found this document useful (0 votes)
417 views24 pages

Wago App HTTP

The document provides an overview of the WagoAppHTTP library, version 1.7.3.4, designed for the e!COCKPIT software to facilitate HTTP client functionalities. It outlines the library's intended use, programming languages supported, and details on various program organization units and their functionalities. Additionally, it emphasizes the necessity for qualified personnel to handle tasks related to the library and automation hardware/software products.

Uploaded by

titanhou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
417 views24 pages

Wago App HTTP

The document provides an overview of the WagoAppHTTP library, version 1.7.3.4, designed for the e!COCKPIT software to facilitate HTTP client functionalities. It outlines the library's intended use, programming languages supported, and details on various program organization units and their functionalities. Additionally, it emphasizes the necessity for qualified personnel to handle tasks related to the library and automation hardware/software products.

Uploaded by

titanhou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

WagoAppHTTP

Release 1.7.3.4

Jun 30, 2022


Contents

1 Description 1

2 20 Program Organization Units 3


2.1 Advanced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1 FbHTTP_Client_Curl (FB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.2 FbHTTP_Get_2 (FB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.3 FbHTTP_Post_2 (FB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.4 FbHTTPs_Get_2 (FB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.5 FbHTTPs_Post_2 (FB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1.6 eHTTP_RequestType (ENUM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 FbHTTP_Get (FB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 FbHTTP_Post (FB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4 FbHTTPs_Get (FB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5 FbHTTPs_Post (FB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6 eAuthentication (ENUM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3 80 Status 16
3.1 Status (GVL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 eStatusHTTP_Curl (ENUM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4 ParameterList (PARAMS) 17

5 VersionHistory (GVL) 18

6 Library Reference 19
6.1 Standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.1.1 Library Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.1.2 Library Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2 WagoSysCurl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2.1 Library Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2.2 Library Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.3 WagoSysErrorBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.3.1 Library Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.3.2 Library Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.3.3 Library Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.4 WagoSysVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.4.1 Library Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.4.2 Library Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.5 WagoTypesCurl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.5.1 Library Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.5.2 Library Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

i
6.6 WagoTypesErrorBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.6.1 Library Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.6.2 Library Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

ii
CHAPTER 1

Description

This document is automatically generated. Because of this, the chapter 30 Visualization is not shown in this
document. If you are interested in getting to know more about visualization, we refer to the library manager of
e!Cockpit.
Subject to Changes
WAGO GmbH & Co. KG reserves the right to provide for any alterations or modifications. WAGO GmbH & Co.
KG owns all rights arising from the granting of patents or from the legal protection of utility patents. Third-party
products are always mentioned without any reference to patent rights. Thus, the existence of such rights cannot
be excluded.
Personnel Qualification
All tasks that are carried out with libraries made for the e!COCKPIT software must only be performed by qualified
electrical specialists instructed in PLC programming according to IEC 61131-3.
All tasks that have an effect on the properties or the behavior of automation hardware or software products must
only be performed by qualified employees with a thorough knowledge of handling the products concerned.
Intended Use of e!COCKPIT Libraries
Libraries created for the e!COCKPIT software are used to simplify the development of application projects in the
IEC 61131-3 programming languages.
For automation tasks, WAGO offers programmable logic controllers in a wide variety of performance classes.
In combination with a wide range of I/O modules, the controllers can process standard types of field signals.
Controllers can be implemented centrally or in decentralized configurations. The controllers offer interfaces for
the most commonly used fieldbuses for use in decentralized configurations. Fieldbus independent I/O modules
are then linked via fieldbus couplers. WAGO controllers offer a runtime environment for user programs called
e!RUNTIME. Software projects for implementation in e!RUNTIME environments can be created in e!COCKPIT.
The programming environment in e!COCKPIT is based on the established CODESYS 3 industrial standard. Users
with a previous knowledge of CODESYS 3 will thus find this environment largely familiar. The following pro-
gramming languages of the IEC 61131-3 standard are available:
• Structured Text (ST)
• Ladder Diagram (LD)
• Function Block Diagram (FBD)
• Instruction List (IL)
• Sequential Function Chart (SFC)

1
WagoAppHTTP, Release 1.7.3.4

• Continuous Function Chart (CFC)


The individual programming languages can also be combined as required during the development of the software.
A portfolio of prepared libraries can be accessed for many frequently used functions in order to make software
development more efficient. This document provides an overview of the WagoAppHTTP that WAGO offers for
e!COCKPIT.
This library provides a simple HTTP-Client1
Further library information are summerized here:
Company WAGO
Title WagoAppHTTP
Version 1.7.3.4
Categories WAGO FunctionalView|Connectivity; WAGO LayerView|App; Application
Author Wago/u010663
Placeholder WagoAppHTTP

Based on WagoAppHTTP.library, last modified 30.06.2022, 20:15:55. LibDoc 3.5.15.30

2
CHAPTER 2

20 Program Organization Units

2.1 Advanced
2.1.1 FbHTTP_Client_Curl (FB)
Interface variables

Scope Name Type Comment


eRequestType eHTTP_RequestType HEAD, GET, POST or PUT
pURI POINTER TO BYTE Pointer to the URI, e.g. ADR(MyURI)
udiURI_LengthUDINT Length of URI
sUser STRING(1023) Authentification if needed by the webserver
sPassword STRING(1023) Authentification if needed by the webserver
pHeader POINTER TO BYTE Pointer to the Header, e.g. ADR(MyHeader). Leave
empty, if the default settings should be used;
Input udiHeader_Length
UDINT Length of the header
pPostfields POINTER TO BYTE Pointer to the Postfield
udiPostfields_Length
UDINT Length of the postfield data
eAuthentication
eAuthentication 0 = none, 1 = basic -> 2 = digest for future use
pRxBuffer POINTER TO Pointer to the receive buffer
DWORD
udiRxBuffer_Size
UDINT receive buffer size
tTimeout TIME If tTimeout = 0, the timeout is deactivated
xHTTPs BOOL Use of HTTPs instead of HTTP
typSSL_Options
WagoTypesCurl. Details in WagoTypesCurl or above
typSSL_Options
Inout xTrigger BOOL perform a request
xBusy BOOL job in progress
xError BOOL job finished with error
oStatus WagoSysErrorBase. detailed status information
Output
FbResult
sStatus STRING
uiResponceCode
UINT
udiRxIndex UDINT Number of Bytes, that have been received by the
Post-command
Function*

3
WagoAppHTTP, Release 1.7.3.4

Compact function block performing an HTTP(s) request.


Graphical Illustration

Function description
This function block communicate with an HTTP server via HTTP(s) request.

2.1. Advanced 4
WagoAppHTTP, Release 1.7.3.4

Scope Name Type Comment


Input eRequest- eHTTP_RequestType
HEAD, GET, POST ,PUT or DELETE
Type
Input pURI POINTER TO Pointer to the URI, e.g. ADR(MyURI)
BYTE
Input udi- UDINT Length of URI
URI_Length
Input sUser STRING(1023) Authentification if needed by the webserver
Input sPassword STRING(1023) Authentification if needed by the webserver
Input pHeader POINTER TO Pointer to the Header, e.g. ADR(MyHeader).
BYTE Leave empty, if the default settings should be
used;
Input udi- UDINT Length of the header
Header_Length
Input pPostfields POINTER TO Pointer to the Postfield
BYTE
Input udiPost- UDINT Length of the postfield data
fields_Length
Input eAuthenti- eAuthentication 0 = none, 1 = basic, 2 = digest (Option
cation digest not yet supported)
Input pRxBuffer POINTER TO Pointer to the receive buffer
DWORD
Input udiRxBuffer_Size
UDINT receive buffer size
Input tTimeout TIME If tTimeout = 0, the timeout is deactivated
Input xHTTPs BOOL Use of HTTPs instead of HTTP
Input typSSL_OptionsWagoTypes- Details in WagoTypesCurl or below
Curl.typSSL_Options
In- xTrigger BOOL perform a request
put/Output
Output xBusy BOOL job in progress
Output xError BOOL job finished with error
Output oStatus WagoSysError- detailed status information
Base.FbResult
Output sStatus STRING
Output uiRespon- UINT
ceCode
Output udiRxIndex UDINT Number of Bytes, that have been received by
the Post-command
Input eAuthentication: Option digest not yet supported
Input sHeader: This input may be used to specify the Header field as defined in RFC7231 example 1:
sHeader:=’Accept: text/plain’
example 2: sHeader:=’Content-type: text/html ; charset=UTF-8’
Input typSSL_Options:
Use sCA_Path if you have imported a bundle file like cacert.pem By default the cacert.pem from
mozilla.org is used (for more information: http://hg.mozilla.org/releases/mozilla-release/raw-file/
default/security/nss/lib/ckfw/builtins/certdata.txt
Use sCA_Cert if you have imported a single server certificate in pem format.
Option xVerifyPeer allows to check the basic certificate information. Option should be false, if no
server certificate is available
Option xVerifyHost allows to check the exact identity of the server by means of common name.
Leave ‘‘sClientCert‘‘blank, unless a client certificate is used

2.1. Advanced 5
WagoAppHTTP, Release 1.7.3.4

Leave sClientCert_Key blank, unless a client certificate is used


Leave sClientCert_KeyPasswd blank, unless a client certificate is used

2.1.2 FbHTTP_Get_2 (FB)


Interface variables

Scope Name Type Comment


pURI POINTER TO BYTE
udiURI_Length UDINT e.g.: http://192.168.1.17
sUser STRING(1023) Authentification if needed by the webserver
sPassword STRING(1023) Authentification if needed by the webserver
pHeader POINTER TO BYTE leave empty, if the default settings should be
Input
used
udiHeaderLength
UDINT Length of the header string
eAuthentication
eAuthentication 0=none, 1=basic ->2=digest future use
pRxBuffer POINTER TO DWORD Pointer to the receive buffer
udiRxBufferSize
UDINT receive buffer size
tTimeout TIME If tTimeout = 0, the timeout is deactivated
Inout xTrigger BOOL perform a request
xBusy BOOL job in progress
xError BOOL job finished with error
Output
oStatus WagoSysErrorBase. detailed status information
FbResult
udiRxNBytes UDINT Number of Bytes, that have been received by
the Get-command
Function
Compact function block performing a HTTP Get request
Graphical Illustration

Function description
This function block should be used reading data from a webserver. As defined by the standard, it is also possible
to transfer a small amount of data to the webserver. In this case the URI must contain the data in an appropriate
manner.
Input eAuthentication: | Option digest not yet supported
Input pHeader: | This input may be used to specify the Header field as defined in RFC7231 | example 1:
| sHeader:=’Accept: text/plain’ | pHeader:=adr(sHeader); | example 2: | sHeader:=’Content-type: text/html ;
charset=UTF-8’ | pHeader:=adr(sHeader);

2.1. Advanced 6
WagoAppHTTP, Release 1.7.3.4

2.1.3 FbHTTP_Post_2 (FB)


Interface variables

Scope Name Type Comment


pURI POINTER TO BYTE e.g. adr(MyURI) and
URI:=http://192.168.1.17
udiURI_Length UDINT length of URI
sUser STRING(1023) Authentification
sPassword STRING(1023) Authentification
pPostfields POINTER TO BYTE e.g. adr(MyPostfield)
Input
udiPostfieldLength
UDINT Length of the postfield data
pHeader POINTER TO BYTE leave empty, if the default settings should be
used
udiHeaderLength UDINT Length of the header
eAuthentication eAuthentication 0=none, 1=basic ->2=digest future use
pRxBuffer POINTER TO DWORD Pointer to the receive buffer
udiRxBufferSize UDINT receive buffer size
tTimeout TIME If tTimeout = 0, the timeout is deactivated
Inout xTrigger BOOL perform a request
xBusy BOOL job in progress
xError BOOL job finished with error
Output
oStatus WagoSysErrorBase. detailed status information
FbResult
udiRxNBytes UDINT Number of Bytes, that have been received by
the Get-command
Function
Compact function block performing a HTTP Post request
Graphical Illustration

Function description
This function block should be used reading data from a webserver by using the HTTP post command.
Input eAuthentication: | Option digest not yet supported
Input pHeader: | This input may be used to specify the Header field as defined in RFC7231 | exam-
ple 1: | pHeader:=adr(sHeader); | sHeader:=’Accept: text/plain’ | example 2: | pHeader:=adr(sHeader); |
sHeader:=’Content-type: text/html ; charset=UTF-8’

2.1. Advanced 7
WagoAppHTTP, Release 1.7.3.4

2.1.4 FbHTTPs_Get_2 (FB)


Interface variables

Scope Name Type Initial Comment


pURI POINTER TO BYTE Pointer to the URI, e.g. ADR(MyURI)
udiURI_Length
UDINT Length of URI
sUser STRING(1023) Authentification if needed by the webserver
sPassword STRING(1023) Authentification if needed by the webserver
pHeader POINTER TO BYTE Pointer to the Header, e.g.
Input ADR(MyHeader),leave empty, if the default
settings should be used
udiHeaderLength
UDINT Length of the header
eAuthentication
eAuthentication basic 0=none, 1=basic ->2=digest future use
pRxBuffer POINTER TO Pointer to the receive buffer
DWORD
udiRxBufferSize
UDINT Receive buffer size
tTimeout TIME If tTimeout = 0, the timeout is deactivated
typSSL_Options
WagoTypesCurl. Details in WagoTypesCurl or above
typSSL_Options
Inout xTrigger BOOL perform a request
xBusy BOOL job in progress
xError BOOL job finished with error
Output
oStatus WagoSysErrorBase. detailed status information
FbResult
udiRxNBytesUDINT Number of Bytes, that have been received by the
Get-command
Function
This function block should be used reading data from a webserver by using the HTTP get command.
Graphical Illustration

Function description
This function block should be used reading data from a webserver. As defined by the standard, it is also possible
to transfer a small amount of data to the webserver. In this case the URI must contain the data in an appropriate
manner.
Input eAuthentication: | Option digest not yet supported
Input sHeader: | This input may be used to specify the Header field as defined in RFC7231 | example 1: |
sHeader:=’Accept: text/plain’ | example 2: | sHeader:=’Content-type: text/html ; charset=UTF-8’

2.1. Advanced 8
WagoAppHTTP, Release 1.7.3.4

Input typSSL_Options: Use sCA_Path if you have imported a bundle file like cacert.pem By default the cac-
ert.pem from mozilla.org is used (for more information: http://hg.mozilla.org/releases/mozilla-release/raw-file/
default/security/nss/lib/ckfw/builtins/certdata.txt
Use sCA_Cert if you have imported a single server certificate in pem format.
Option xVerifyPeer allows to check the basic certificate information. Option should be false, if no server
certificate is available
Option xVerifyHost allows to check the exact identity of the server by means of common name.
Leave ‘‘sClientCert‘‘blank, unless a client certificate is used
Leave sClientCert_Key blank, unless a client certificate is used
Leave sClientCert_KeyPasswd blank, unless a client certificate is used

2.1.5 FbHTTPs_Post_2 (FB)


Interface variables

Scope Name Type Comment


pURI POINTER TO BYTE e.g. adr(MyURI) and
URI:=http://192.168.1.17
udiURI_Length UDINT length of URI
sUser STRING(1023) Authentification
sPassword STRING(1023) Authentification
pPostfields POINTER TO BYTE e.g. adr(MyPostfield)
Input udiPostfieldLength
UDINT Length of the postfield data
pHeader POINTER TO BYTE leave empty, if the default settings should be
used
udiHeaderLengthUDINT Length of the header
eAuthenticationeAuthentication 0=none, 1=basic ->2=digest future use
pRxBuffer POINTER TO DWORD Pointer to the receive buffer
udiRxBufferSizeUDINT receive buffer size
tTimeout TIME If tTimeout = 0, the timeout is deactivated
typSSL_Options WagoTypesCurl. details in WagoTypesCurl
typSSL_Options
Inout xTrigger BOOL perform a request
xBusy BOOL job in progress
xError BOOL job finished with error
Output
oStatus WagoSysErrorBase. detailed status information
FbResult
udiRxNBytes UDINT Number of Bytes, that have been received
by the Get-command
Function
Compact function block performing a HTTP Post request
Graphical Illustration

2.1. Advanced 9
WagoAppHTTP, Release 1.7.3.4

Function description
This function block should be used reading data from a webserver by using the HTTP post command.
Input eAuthentication: | Option digest not yet supported
Input pHeader: | This input may be used to specify the Header field as defined in RFC7231 | exam-
ple 1: | pHeader:=adr(sHeader); | sHeader:=’Accept: text/plain’ | example 2: | pHeader:=adr(sHeader); |
sHeader:=’Content-type: text/html ; charset=UTF-8’
Input typSSL_Options: Use sCA_Path if you have imported a bundle file like cacert.pem By default the cac-
ert.pem from mozilla.org is used (for more information: http://hg.mozilla.org/releases/mozilla-release/raw-file/
default/security/nss/lib/ckfw/builtins/certdata.txt
Use sCA_Cert if you have imported a single server certificate in pem format.
Option xVerifyPeer allows to check the basic certificate information. Option should be false, if no server
certificate is available
Option xVerifyHost allows to check the exact identity of the server by means of common name.
Leave ‘‘sClientCert‘‘blank, unless a client certificate is used
Leave sClientCert_Key blank, unless a client certificate is used
Leave sClientCert_KeyPasswd blank, unless a client certificate is used

2.1.6 eHTTP_RequestType (ENUM)


Attributes:
qualified_only
Name Initial Comment
0 Send HTTP-HEAD-Request
HEAD
1 Send HTTP-GET-Request
GET
InOut: 2 Send HTTP-POST-Request
POST
3 Send HTTP-PUT-Request
PUT
4 Send HTTP-DELETE-Request
DELETE

2.1. Advanced 10
WagoAppHTTP, Release 1.7.3.4

2.2 FbHTTP_Get (FB)


Interface variables

Scope Name Type Comment


sURI STRING(1023) e.g.: http://192.168.1.17
sUser STRING(1023) Authentification if needed by the webserver
sPassword STRING(1023) Authentification if needed by the webserver
sHeader STRING(1023) leave empty, if the default settings should be
Input
used
eAuthentication
eAuthentication 0=none, 1=basic ->2=digest future use
pRxBuffer POINTER TO DWORD Pointer to the receive buffer
udiRxBufferSize
UDINT receive buffer size
tTimeout TIME If tTimeout = 0, the timeout is deactivated
Inout xTrigger BOOL perform a request
xBusy BOOL job in progress
xError BOOL job finished with error
Output
oStatus WagoSysErrorBase. detailed status information
FbResult
udiRxNBytes UDINT Number of Bytes, that have been received by
the Get-command
Function
Compact function block performing a HTTP Get request
Graphical Illustration

Function description
This function block should be used reading data from a webserver. As defined by the standard, it is also possible
to transfer a small amount of data to the webserver. In this case the URI must contain the data in an appropriate
manner. The size of the URI is limited to 1023 byte.
Input eAuthentication: | Option digest not yet supported
Input sHeader: | This input may be used to specify the Header field as defined in RFC7231 | example 1: |
sHeader:=’Accept: text/plain’ | example 2: | sHeader:=’Content-type: text/html ; charset=UTF-8’

2.3 FbHTTP_Post (FB)


Interface variables

2.2. FbHTTP_Get (FB) 11


WagoAppHTTP, Release 1.7.3.4

Scope Name Type Comment


sURI STRING(1023) e.g.: http://192.168.1.17
sUser STRING(1023) Authentification
sPassword STRING(1023) Authentification
sPostfields STRING(1023) “name=daniel&project=water”
Input sHeader STRING(1023)
eAuthentication
eAuthentication 0=none, 1=basic ->2=digest future use
pRxBuffer POINTER TO DWORD Pointer to the receive buffer
udiRxBufferSize
UDINT receive buffer size
tTimeout TIME If tTimeout = 0, the timeout is deactivated
Inout xTrigger BOOL perform a request
xBusy BOOL job in progress
xError BOOL job finished with error
Output
oStatus WagoSysErrorBase. detailed status information
FbResult
udiRxNBytes UDINT Number of Bytes, that have been received by
the Get-command
Function
Compact function block performing a HTTP Post request
Graphical Illustration

Function description
This function block should be used reading data from a webserver by using the HTTP post command.
Input eAuthentication: | Option digest not yet supported
Input sHeader: | This input may be used to specify the Header field as defined in RFC7231 | example 1: |
sHeader:=’Accept: text/plain’ | example 2: | sHeader:=’Content-type: text/html ; charset=UTF-8’

2.4 FbHTTPs_Get (FB)


Interface variables

2.4. FbHTTPs_Get (FB) 12


WagoAppHTTP, Release 1.7.3.4

Scope Name Type Initial Comment


sURI STRING(1023) e.g.: https://www.google.de/
sUser STRING(1023) Authentification if needed by the
webserver
sPassword STRING(1023) Authentification if needed by the
Input webserver
sHeader STRING(1023) leave empty, if the default settings should
be used
eAuthentication
eAuthentication basic 0=none, 1=basic ->2=digest future use
pRxBuffer POINTER TO DWORD Pointer to the receive buffer
udiRxBufferSize
UDINT Receive buffer size
tTimeout TIME If tTimeout = 0, the timeout is
deactivated
typSSL_Options
WagoTypesCurl. Details in WagoTypesCurl or above
typSSL_Options
Inout xTrigger BOOL perform a request
xBusy BOOL job in progress
xError BOOL job finished with error
Output
oStatus WagoSysErrorBase. detailed status information
FbResult
udiRxNBytes UDINT Number of Bytes, that have been
received by the Get-command
Function
This function block should be used reading data from a webserver by using the HTTP get command.
Graphical Illustration

Function description
This function block should be used reading data from a webserver. As defined by the standard, it is also possible
to transfer a small amount of data to the webserver. In this case the URI must contain the data in an appropriate
manner. The size of the URI is limited to 1023 byte.
Input eAuthentication: | Option digest not yet supported
Input sHeader: | This input may be used to specify the Header field as defined in RFC7231 | example 1: |
sHeader:=’Accept: text/plain’ | example 2: | sHeader:=’Content-type: text/html ; charset=UTF-8’
Input typSSL_Options: Use sCA_Path if you have imported a bundle file like cacert.pem By default the cac-
ert.pem from mozilla.org is used (for more information: http://hg.mozilla.org/releases/mozilla-release/raw-file/
default/security/nss/lib/ckfw/builtins/certdata.txt
Use sCA_Cert if you have imported a single server certificate in pem format.

2.4. FbHTTPs_Get (FB) 13


WagoAppHTTP, Release 1.7.3.4

Option xVerifyPeer allows to check the basic certificate information. Option should be false, if no server
certificate is available
Option xVerifyHost allows to check the exact identity of the server by means of common name.
Leave ‘‘sClientCert‘‘blank, unless a client certificate is used
Leave sClientCert_Key blank, unless a client certificate is used
Leave sClientCert_KeyPasswd blank, unless a client certificate is used

2.5 FbHTTPs_Post (FB)


Interface variables

Scope Name Type Comment


sURI STRING(1023) e.g.: https://www.google.de/
sUser STRING(1023) Authentification
sPassword STRING(1023) Authentification
sPostfields STRING(1023) “name=daniel&project=water”
sHeader STRING(1023)
Input
eAuthentication
eAuthentication 0=none, 1=basic ->2=digest future use
pRxBuffer POINTER TO DWORD Pointer to the receive buffer
udiRxBufferSize
UDINT receive buffer size
tTimeout TIME If tTimeout = 0, the timeout is deactivated
typSSL_Options
WagoTypesCurl. details in WagoTypesCurl
typSSL_Options
Inout xTrigger BOOL perform a request
xBusy BOOL job in progress
xError BOOL job finished with error
Output
oStatus WagoSysErrorBase. detailed status information
FbResult
udiRxNBytes UDINT Number of Bytes, that have been received by
the Get-command
Function
Compact function block performing a HTTP Post request
Graphical Illustration

Function description
This function block should be used reading data from a webserver by using the HTTP post command.

2.5. FbHTTPs_Post (FB) 14


WagoAppHTTP, Release 1.7.3.4

Input eAuthentication: | Option digest not yet supported


Input sHeader: | This input may be used to specify the Header field as defined in RFC7231 | example 1: |
sHeader:=’Accept: text/plain’ | example 2: | sHeader:=’Content-type: text/html ; charset=UTF-8’
Input typSSL_Options: Use sCA_Path if you have imported a bundle file like cacert.pem By default the cac-
ert.pem from mozilla.org is used (for more information: http://hg.mozilla.org/releases/mozilla-release/raw-file/
default/security/nss/lib/ckfw/builtins/certdata.txt
Use sCA_Cert if you have imported a single server certificate in pem format.
Option xVerifyPeer allows to check the basic certificate information. Option should be false, if no server
certificate is available
Option xVerifyHost allows to check the exact identity of the server by means of common name.
Leave ‘‘sClientCert‘‘blank, unless a client certificate is used
Leave sClientCert_Key blank, unless a client certificate is used
Leave sClientCert_KeyPasswd blank, unless a client certificate is used

2.6 eAuthentication (ENUM)


Name Initial
0
None
InOut: 1
Basic
2
Digest

2.6. eAuthentication (ENUM) 15


CHAPTER 3

80 Status

3.1 Status (GVL)


Description Status information

3.2 eStatusHTTP_Curl (ENUM)


Name Initial
0
OK
InOut: 1
BAD_HTTP_RESPONSE
2
VARIABLE_CODE
Description Status information

16
CHAPTER 4

ParameterList (PARAMS)

Scope Name Type Initial Comment


InOut: Constant INT 600 for future use ->length of the postfield
POST-
argument
FIELD_LENGTH

17
CHAPTER 5

VersionHistory (GVL)

WagoAppHTTP
Date Version Author Change
10.12.2021 1.7.3.4 WAGO / Add DELETE command in FbHTTP_Client_Curl
u010663
04.06.2020 1.7.3.3 WAGO / Bugfix FbHTTP_Client_Curl
u010663
09.12.2019 1.7.3.2 WAGO / Improvement error codes, e.g. 404
u010663
09.05.2019 1.7.3.1 WAGO / New function block FbHTTP_Client_Curl in folder Advanced
u010663
08.01.2019 1.7.3.0 WAGO / Properties: free placeholder added
u015842
03.12.2018 1.7.2.0 WAGO / New function blocks in folder Advanced
u010663
04.06.2018 1.7.1.2 WAGO / Change Placeholder for WagoSysCurl
u013972
30.08.2017 1.7.1.1 WAGO / Documentation issues
u010663
05.04.2017 1.7.1.0 WAGO / Size of string inputs increased (1023)
u010663
15.12.2016 1.7.0.4 WAGO / Bugfix FbHTTPs_Get and FbHTTPs_Post, input
u010663 typAuthentification renamed
09.12.2016 1.7.0.2 WAGO / Add FbHTTPs_Get and FbHTTPs_Post ,
u010663 PFC200,PFC100:requieres FW>8
19.05.2016 1.6.0.1 WAGO / R3 released
u010663
Release Notes
Version 1.7.2.0 and greater require FW11Patch2 (with ipk tsccurl_0.0.2) or higher
Version 1.7.1.0 and greater require FW10 or higher
HTTPs functionality requieres in case of a PFC200 or PFC100 a firmware greater than 8 Authentifi-
cation method “Digest-MD5” not yet supported

18
CHAPTER 6

Library Reference

This is a dictionary of all referenced libraries and their name spaces.

6.1 Standard
6.1.1 Library Identification
Placeholder: Standard
Default Resolution: Standard, * (System)
Namespace: Standard

6.1.2 Library Properties


• LinkAllContent: False
• QualifiedOnly: False
• Key: Standard
• SystemLibrary: False
• Optional: False

6.2 WagoSysCurl
6.2.1 Library Identification
Placeholder: WagoSysCurl
Default Resolution: WagoSysCurl, * (WAGO)
Namespace: WagoSysCurl

6.2.2 Library Properties


• LinkAllContent: False
• QualifiedOnly: True
• Key: WagoSysCurl
• SystemLibrary: False
• Optional: False

19
WagoAppHTTP, Release 1.7.3.4

6.3 WagoSysErrorBase
6.3.1 Library Identification
Placeholder: WagoSysErrorBase
Default Resolution: WagoSysErrorBase, * (WAGO)
Namespace: WagoSysErrorBase

6.3.2 Library Properties


• LinkAllContent: False
• QualifiedOnly: True
• Key: WagoSysErrorBase
• SystemLibrary: False
• Optional: False

6.3.3 Library Parameter


Parameter: RES_LOG_MAX_FILESIZE = 2000

Parameter: RES_LOG_MAX_FILES = 1

Parameter: RES_LOG_MAX_ENTRIES = 200

Parameter: RES_LOG_NAME = ‘WagoAppResultLogger’

6.4 WagoSysVersion
6.4.1 Library Identification
Name: WagoSysVersion
Version: 1.0.0.0
Company: WAGO
Namespace: WagoSysVersion

6.4.2 Library Properties


• LinkAllContent: False
• QualifiedOnly: False
• Key: WagoSysVersion, 1.0.0.0 (WAGO)
• SystemLibrary: False
• Optional: False

6.5 WagoTypesCurl
6.5.1 Library Identification
Placeholder: WagoTypesCurl
Default Resolution: WagoTypesCurl, * (WAGO)
Namespace: WagoTypesCurl

6.3. WagoSysErrorBase 20
WagoAppHTTP, Release 1.7.3.4

6.5.2 Library Properties


• LinkAllContent: False
• Optional: False
• QualifiedOnly: False
• Key: WagoTypesCurl
• SystemLibrary: False
• PublishSymbolsInContainer: True

6.6 WagoTypesErrorBase
6.6.1 Library Identification
Placeholder: WagoTypesErrorBase
Default Resolution: WagoTypesErrorBase, * (WAGO)
Namespace: WagoTypesErrorBase

6.6.2 Library Properties


• LinkAllContent: False
• QualifiedOnly: True
• Key: WagoTypesErrorBase
• SystemLibrary: False
• Optional: False
© WAGO Kontakttechnik GmbH & Co. KG, Germany 2018 – All rights reserved. For the avoidance of doubt,
this copyright notice does not only apply to the information above but also and primarily to the described library
itself. Please note that third-party products are always mentioned without reference to intellectual property rights,
including patents, utility models, designs and trademarks, accordingly the existence of such rights cannot be
excluded. WAGO is a registered trademark of WAGO Verwaltungsgesellschaft mbH.

6.6. WagoTypesErrorBase 21

You might also like