Libcurl faq (https://github.com/mikeduglas/libcurl)

Q. Is it possible to show a progress bar during the execution of curl.SendRequest?

A. Yes it is possible, you should derive XFerInfo callback method, for example:

curl                        CLASS(TCurlClass)
XFerInfo                        PROCEDURE(REAL dltotal, REAL dlnow, REAL ultotal, REAL ulnow), LONG, DERIVED
                              END

curl.XFerInfo         PROCEDURE(REAL dltotal, REAL dlnow, REAL ultotal, REAL ulnow)
  CODE
  IF dlnow
    !- downloaded {dlnow} of {dltotal} bytes
   END
  
  IF ulnow
    !- uploaded {ulnow} of {ultotal} bytes
  END
  
  RETURN PARENT.XFerInfo(dltotal, dlnow, ultotal, ulnow)
4 Likes

Hi Mike,

Will you be updating to LibCurl Ver 7.80.0 - November 10 2021.

Not pushing, your LibCurl is still working 100% for what I use it for in C6.3 and C10.
Just thinking of all the Bug Fixes since 7.65.3 update.

Regards

Johan de Klerk

Hi Johan,

I will update the binaries later today or tomorrow.

1 Like

v1.50 is on GitHub now.

1 Like

Hi Mike,

Thank you very much.
You are fast as always.

Regards

Johan de Klerk

Thank you Mike for your great tools and help, excellent!!

Best regards
Jeffrey Kuijt

Hi Mike,

I just updated my system to Ver 1.50.

Getting Error on Compile:
Error(3): cif$fileopen printf.inc The system cannot find the path specified. - C:\Clarion10\Accessory\LibSrc\Win\libcurldropbox.clw:1

PS: Update.
I copied the libcurldropbox.clw from Ver 1.49 as a temporary fix just to get a compile and do some testing.
Using the Simple FTP Manager C10 example as a test system.
When the Remote System has Folders with spaces in the folder name and you try to change folder I get the following error:
URL using bad/illegal format or missing URL

Regards

Johan de Klerk

Below is printf link.

Hi Mike,

Thanks got it.

Now I get 13 new errors:
Unknown function label - C:\Clarion10\Accessory\LibSrc\Win\libcurldropbox.clw:77,10
on all these lines:
args = printf(‘code=%s&grant_type=authorization_code&client_id=%s&client_secret=%s’, pAuthCode, pAppKey, pAppSecret)

All the lines with: args = printf(
Regards

Johan de Klerk

Have you downloaded master.zip from github, then copied inc and clw to, say, accessory\libsrc\win folder?

Well, I found something on curl forum regarding v7.79.1:

A valid URL cannot contain spaces and curl recently made the check for that stricter. A space in a URL is normally encoded as %20

Hi Mike,

Yes.

Regards

Johan de Klerk

Hi Mike,

Is there a way that you will be able to work around this.
Else it is going to cause a nightmare.
We don’t have control over how the SFTP or any other server folders is created.

Regards

Johan de Klerk

Sure I will try to fix this asap.

Hi Mike,

You are a star. :slightly_smiling_face:
Thanks.

Regards

Johan de Klerk

So, both printf files are in accessible folder, but printf is unknown function label? That’s odd.

Hi Mike,

Yes the printf.clw & printf.clw files are both in the C:\Clarion10\accessory\libsrc\win folder.

Regards

Johan de Klerk

Are you able to compile and run test project from printf\test?

Hi Mike,

Getting errors.
Unknown procedure label - C:\PrintF\test.clw:9,3 on this printd(

Unknown function label - C:\PrintF\test.clw:9,16 on this printf(

Regards

Johan de Klerk

Hi Mike,

Please ignore the errors on PrintF.
I re-copied everything and now it compiles 100%.

I think it must have changed the formatting or spacing when I created the two printf files the first time.

Sorry for wasting your time with the printf errors that were not errors.

Regards

Johan de Klerk