jwtHeaderAdd (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All

Firmware version:

1.70.00


jwtHeaderAdd adds a new string 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 : STRING

The string 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 jwtHeaderAdd : INT;
VAR_INPUT
  jwt   : SYSHANDLE;
  name  : STRING;
  value : STRING;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc  : INT;
  jwt : SYSHANDLE;
END_VAR;
 
BEGIN
  ...
  // Add header
  rc := jwtHeaderAdd(jwt := jwt, name := "name", value := "John Doe");
  ...
END;
 
END_PROGRAM;