restReqBodySetString (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function will set the body content of a request to the provided string.

When the body needs to contain mostly fixed data, one option is to use strTemplateCreate to add the dynamic data to a fixed template string, which can then be used as the body, without needing to manually create the entire string.

 

Input:

req : SYSHANDLE

A handle to the request.

 

str : STRING

The string to use for the request body.

 

 

Returns: INT

1


- Success

0


- Not supported

-1


- Invalid request

-3


- Failed to set query

-5


- Request is read only.

 

Declaration:

FUNCTION restReqBodySetString: INT;
VAR_INPUT
  req            : SYSHANDLE;
  str            : STRING;
END_VAR;

 

 

Example:

Please see the "Examples - REST Basic Authentication Example"