restRespHeaderSet (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function will set the value of a header field in a response.

 

Input:

resp : SYSHANDLE

A handle to the response.

 

name : STRING

The name of the header field to set.

Common fields include "Content-Type", "Accept" and "User-Agent".

 

value : STRING

The new value of the field.

 

 

Returns: INT

1


- Success

0


- Not supported

-1


- Invalid response

-3


- Failed to set header

-5


- Response is read only.

 

Declaration:

FUNCTION restRespHeaderSet: INT;
VAR_INPUT
  req            : SYSHANDLE;
  name           : STRING;
  value          : STRING;
END_VAR;

 

 

Example:

Please see the "Examples - REST Example"