type

 TScOnGetNextChunkDataEvent = procedure (Sender: TObject; out Buffer: TValueArr; out Count: Integer) of object;

 

property OnGetNextChunkData: TScOnGetNextChunkDataEvent;

 

Description

The OnGetNextChunkData event occurs when writing request data to HTTP server if SendChunked is set to True and RequestStream is set to nil.

This property can only be set if SendChunked is set to True and Method is not rmGET or rmHEAD, otherwise the HttpException will be raised.

When writing request data to the HTTP server (that is performed by the GetResponse method) TScHttpWebRequest gets data from the OnGetNextChunkData event handler in blocks of size specified in the SendBlockSize property and sends this chunk to the server. Set the Count parameter to 0 to indicate that all data has been transferred. The size of request data in bytes can be also specified in the ContentLength property.

When SendChunked is set to True, TScHttpWebRequest checks whether the RequestStream property or the OnGetNextChunkData event handler is set, and if both are nil, the HttpException will be raised.

 

See Also

RequestStream

SendBlockSize

SendChunked

 

SecureBridge Components, Copyright © 2007-2021 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support