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 returns the number of bytes written.
2) You should check the result of curl_easy_perform to determine if the curl perform operation (HTTP GET) was successful.
I added a check. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal