GetHeaderField

GetHeaderField 1:

This method can read the value of a specific header field from an HTTP response. To be able to read a header field from an HTTP response, the bBusy output of the function block FB_IotHttpRequest must return FALSE.

Syntax

METHOD GetHeaderField : BOOL
VAR_IN_OUT CONSTANT
    sField       : STRING;
END_VAR
VAR_INPUT
    pValue       : PVOID;
    nValueSize   : UDINT;
END_VAR

GetHeaderField 2: Return value

Name

Type

Description

GetHeaderField

BOOL

Returns TRUE if the method call was successful.

GetHeaderField 3: Inputs

Name

Type

Description

pValue

PVOID

Pointer to data memory where the read data should be stored.

nValueSize

UDINT

The maximum size that the buffer of this method can have.

GetHeaderField 4: Inputs/outputs

Name

Type

Description

sField

STRING

Name of the field that is added to the header of the HTTP request.