GetContent

This method reads the HTTP response and saves it into a variable. To be able to read the content from an HTTP response, the bBusy output of the function block FB_IotHttpRequest must return FALSE.
Syntax
METHOD GetContent : BOOL
VAR_INPUT
pContent : PVOID;
nContentSize : UDINT;
bSetNullTermination : BOOL;
END_VAR
Return value
Name | Type | Description |
---|---|---|
GetContent | BOOL | Returns TRUE if the method call was successful. |
Inputs
Name | Type | Description |
---|---|---|
pContent | PVOID | Pointer to data memory where the read data should be stored. |
nContentSize | UDINT | Size of the received message. |
bSetNullTermination | BOOL | If the received message is a STRING, it can be specified either with or without null termination. If bSetNullTermination is set to TRUE, null termination is enforced. Please note that nContentSize must then be increased by +1. |