ns=2;s=DEPRAG Smart/Network/HTTP/REST/ActiveClients/0/AddHeaderField
The command adds a new header element in the request.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bHttpAddHeaderField : BOOL;
OutputDataHttpAddHeaderField: ST_VoidOutputData;
hrHttpAddHeaderField : HRESULT;
fbHttpRest : FB_HttpRest;
END_VAR
hrHttpAddHeaderField := fbHttpRest.AddHeaderField(
bExecute := bHttpAddHeaderField,
ConnectionHandle:= depragSmartConnection.ConnectionHandle,
sFieldName := 'TestHeaderField',
sValue := 'TestValueHeaderField',
sClientId := '0',
OutputData => OutputDataHttpAddHeaderField);
IF hrHttpAddHeaderField <> S_FALSE THEN
bHttpAddHeaderField := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".