Re: [fpc-pascal] How To: Use lib curl example

2021-12-05 Thread Rainer Stratmann via fpc-pascal
Am Sonntag, 5. Dezember 2021, 20:38:30 CET schrieb Rainer Stratmann via fpc- pascal: > Does that mean curl is always waiting until the whole operation (download) > is complete? > > Is it possible to do it in a nonblocked way? For example with a continuous > nonblocked loop call and a flag when

Re: [fpc-pascal] How To: Use lib curl example

2021-12-05 Thread Rainer Stratmann via fpc-pascal
Does that mean curl is always waiting until the whole operation (download) is complete? Is it possible to do it in a nonblocked way? For example with a continuous nonblocked loop call and a flag when the operation is finished? Am Dienstag, 28. September 2021, 02:01:00 CET schrieb Anthony

Re: [fpc-pascal] How To: Use lib curl example

2021-09-28 Thread Michael Van Canneyt via fpc-pascal
On Tue, 28 Sep 2021, Anthony Walter via fpc-pascal wrote: For the benefit of others, there are a few problems with the FPC example to note. 1) The callback CURLOPT_WRITEFUNCTION should return the number of bytes handled. It does that ? Result:=TStream(Data).Write(Ptr^,Size*nmemb); Write

Re: [fpc-pascal] How To: Use lib curl example

2021-09-28 Thread Anthony Walter via fpc-pascal
For the benefit of others, there are a few problems with the FPC example to note. 1) The callback CURLOPT_WRITEFUNCTION should return the number of bytes handled. 2) You should check the result of curl_easy_perform to determine if the curl perform operation (HTTP GET) was successful.

Re: [fpc-pascal] How To: Use lib curl example

2021-09-28 Thread Anthony Walter via fpc-pascal
Michael, You are right, they are very similar. I didn't know of the existence of the example to which you referred. Thank you for pointing that file out. I searched for it just now and took a look. One difference is that my example ignores certificates problems, but this difference is important

Re: [fpc-pascal] How To: Use lib curl example

2021-09-28 Thread Michael Van Canneyt via fpc-pascal
On Mon, 27 Sep 2021, Anthony Walter via fpc-pascal wrote: I was having some problems using vanilla sockets and OpenSSL to read a few specific web pages using HTTPS. Normally I don't have any problems using HTTPS, but with a few sites my code was not working. I ending up finding the RTL unit