restReqBodySetJSON (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function will set the body content of the request to the provided JSON structure.

 

Input:

req : SYSHANDLE

A handle to the request.

 

json : SYSHANDLE

The JSON structure to use for the body content.

 

 

Returns: INT

1


- Success

0


- Not supported

-1


- Invalid request

-3


- Failed to convert JSON

-4


- Invalid JSON handle.

-5


- Request is read only.

-20


- Failed to set body.

 

 

Declaration:

FUNCTION restReqBodySetJSON: INT;
VAR_INPUT
  req            : SYSHANDLE;
  json           : SYSHANDLE;
END_VAR;

 

 

Example:

Please see the "Examples - REST Example"