Skip to content

OnDataReceived - cBaseHTTPTransfer

Hook that triggers when data is received

Type: Event

Parameters

Parameter Type Description
sContentType string Specifies the content type of sData. Must be a valid MIME type:
sData string Contains the data received from RemoteHost

Syntax

Procedure OnDataReceived string sContentType string sData

Description

The OnDataReceived event is triggered several times during a GetRequest, PostRequest and PutRequest when data arrives from RemoteHost.

Note that sData may not contain all data sent from RemoteHost at once, the OnDataReceived event might be triggered several times before all data has been received.

If the psSaveAsFile property is non-blank, this event will not be triggered, instead any response will be redirected to the specified file.

Performs nothing by default, intended for augmentation to process data sent by RemoteHost.

This event needs to be forward sent when used in a subclass of cJSONHttpTransfer:

Procedure OnDataReceived string sContentType string sData
    Forward Send OnDataReceived sContentType sData
End_Procedure