restReqBodyGetRaw (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

ALL

Firmware version:

2.10.00


This function will copy a part the body contents from the request into the provided buffer.

 

Input:

req : SYSHANDLE

A handle to the request.

 

dst : PTR

A pointer to the buffer to place the body content in.

 

start : DINT (default 0)

The offset to start copying from, starting at 0.

 

size : DINT

The maximum length to read, i.e. the size of the buffer.

 

 

Returns: DINT

>0


- Success, number of bytes copied.

0


- Not supported

-1


- Invalid request

-2


- Start is past the end of the body.

-4


- Size, start or the destination is invalid.

-20


- Body was too large to keep, it is not available.

 

Declaration:

FUNCTION restReqBodyGetRaw : DINT;
VAR_INPUT
  req             : SYSHANDLE;
  dst             : PTR;
  start           : DINT;
  size            : DINT;
END_VAR;

 

 

Example:

Please see the "Examples - REST Basic Authentication Example"