restRespBodyGetRaw (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 response into the provided buffer.

 

Input:

resp : SYSHANDLE

A handle to the response.

 

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: INT

>0


- Success, number of bytes copied.

0


- Not supported

-1


- Invalid response

-2


- Start is past the end of the body.

-4


- Size, start or the destination is invalid.

 

Declaration:

FUNCTION restRespBodyGetRaw : DINT;
VAR_INPUT
  resp            : SYSHANDLE;
  dst             : PTR;
  start           : DINT;
  size            : DINT;
END_VAR;

 

 

Example:

Please see the "Examples - REST Basic Authentication Example"