[fpc-devel] fpHttpClient heartbeat
Michael Van Canneyt
michael at freepascal.org
Sun Mar 9 10:22:24 CET 2014
On Sat, 8 Mar 2014, Leonardo M. Ramé wrote:
>
>
> From: Michael Van Canneyt <michael at freepascal.org>
>> To: FPC developers' list <fpc-devel at lists.freepascal.org>
>> Sent: Saturday, March 8, 2014 2:42 PM
>> Subject: Re: [fpc-devel] fpHttpClient heartbeat
>>
>>
>> On Sat, 8 Mar 2014, Leonardo M. Ramé wrote:
>>
>>> Hi, does anyone know if fpHttpClient has something similar to the HeartBeat option of Synapse?, this feature is useful for
>>> implementing download progress bars, for example.
>>
>> It has an onprogress event, this is implemented in trunk.
>>
>> Michael.
>>
>>
>
> Sorry Michael, I cannot find that event, is in packages/fcl-web/src/base/fphttpclient.pp ?.
My apologies, I wrote from memory.
Less than a month ago I implemented:
Property AllowRedirect : Boolean Read FAllowRedirect Write FAllowRedirect;
// Maximum number of redirects. When this number is reached, an exception is raised.
Property MaxRedirects : Byte Read FMaxRedirects Write FMaxRedirects default DefMaxRedirects;
// Called On redirect. Dest URL can be edited.
// If The DEST url is empty on return, the method is aborted (with redirect status).
Property OnRedirect : TRedirectEvent Read FOnRedirect Write FOnRedirect;
// Authentication.
// When set, they override the credentials found in the URI.
// They also override any Authenticate: header in Requestheaders.
Property UserName : String Read FUserName Write FUserName;
Property Password : String Read FPassword Write FPassword;
// If a request returns a 401, then the OnPassword event is fired.
// It can modify the username/password and set RepeatRequest to true;
Property OnPassword : TPasswordEvent Read FOnPassword Write FOnPassword;
// Called whenever data is read from the connection.
Property OnDataReceived : TDataEvent Read FOnDataReceived Write FOnDataReceived;
// Called when headers have been processed.
Property OnHeaders : TNotifyEvent Read FOnHeaders Write FOnHeaders;
OnDataReceived and OnHeaders is probably what you are looking for. Sorry for the fuzzyness.
Michael.
More information about the fpc-devel
mailing list