jwtHeaderAddBool (Function)

Top  Previous  Next

Architecture:

NX32L

Firmware version:

1.70.00


jwtHeaderAddBool adds a new boolean header to the JWT object.

If the header already exists, it must be deleted first with jwtHeaderDelete.

 

Input:

jwt : SYSHANDLE

A handle to the JWT object.

 

name : STRING

The name of the header to add.

 

value : BOOL

The value to add.

 

 

 

Returns: INT

1

- Success

0

- Function is not supported.

-1

- Invalid name.

-2

- Could not find JWT object.

-6

- Header already exists.

-99

- Failed to add header.

 

 

Declaration:

FUNCTION jwtHeaderAddBool : INT;
VAR_INPUT
   jwt   : SYSHANDLE;
   name  : STRING;
   value : BOOL;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
   rc  : INT;
   jwt : SYSHANDLE;
END_VAR;
 
BEGIN
   ...
   // Add header
   rc := jwtHeaderAddBool(jwt := jwtname := "admin", value := TRUE);
   ...
END;
 
END_PROGRAM;