RemoveHeaderField

TwinCAT TIA
Network REST Client ActiveClients One client

ns=2;s=DEPRAG Smart/Network/HTTP/REST/ActiveClients/0/RemoveHeaderField

The command removes the specified header.

Parameters:

Returns:

    RemoveHeaderField
    A structure variable of the OpcMethodReturnValueBoolean type. The Result property contains the command-specific return values.
      Result
      Indicates whether the header element was successfully removed. If the header element was not found, false is returned.

Examples:

In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:

Beckhoff parameter:

    bHttpRemoveHeaderField
    A boolean variable that can be used to trigger the execution of the RemoveHeaderField command.
    OutputDataHttpRemoveHeaderField
    An instance of the ST_BoolOutputData structure into which the return value of the RemoveHeaderField method is written.
    hrHttpRemoveHeaderField
    This can be used to monitor the execution of the command. Error codes have the type HRESULT.
    fbHttpRest
    An instance of the "FB_HttpRest" function block supplied with the DEPRAG Smart library.
    sFieldName
    A String(255) variable specifying the name of the header element to remove.
    sClientId
    A String(255) variable that specifies the client that should execute the command.
    ConnectionHandle
    "ConnectionHandle" received when establishing a connection between DEPRAG Smart Server and your OPC UA client.


VAR
   bHttpRemoveHeaderField   : BOOL;
   OutputDataHttpRemoveHeaderField : ST_BoolOutputData;
   hrHttpRemoveHeaderField   : HRESULT;
 
   fbHttpRest   : FB_HttpRest;
END_VAR

hrHttpRemoveHeaderField := fbHttpRest.RemoveHeaderField(
          bExecute   := bHttpRemoveHeaderField, 
          ConnectionHandle:= depragSmartConnection.ConnectionHandle,
          sFieldName   := 'TestHeaderField',
          sClientId   := '0',
          OutputData  => OutputDataHttpRemoveHeaderField);
IF hrHttpRemoveHeaderField <> S_FALSE THEN 
    bHttpRemoveHeaderField := 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".