restRespHeaderKey (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function will read the name of a header field in a response.

By calling this multiple times with incrementing index, it is possible to list all the header fields in the response.

 

Input:

resp : SYSHANDLE

A handle to the response.

 

idx : INT (Default 0)

The index of the header field to read the name of.

 

 

Output:

name : STRING

The name of the field.

 

 

Returns: INT

1


- Success

0


- Not supported

-1


- Invalid response

-2


- The header field was not found

 

Declaration:

FUNCTION restRespHeaderKey : INT;
VAR_INPUT
  resp           : SYSHANDLE;
  idx            : INT;
  name           : ACCESS STRING;
END_VAR;

 

 

Example:

Please see the "Examples - REST Basic Authentication Example"