[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: call WebApi requiring API token authorisation


On Tuesday, January 20th, 2026 at 00:16, KKing <kicking177@xxxxxxxxx> wrote:

> call WebApi requiring API token authorisation
> 
> What's the best way to code calling a WebApi requiring an API "BEARER"
> token embedded in a header?
> 
> A quick google initially suggested using Curl but on
> Debian 12 bookworm
> Gambas 3.18.0 from the Debian repository for above
> installed gambas3-gb-net-curl from Debian repository
> Start new command line project
> add gb.net.curl component
> Dim myCurl as Curl
> etc ...
> 
> but F8 fails on first line with
> Class 'Curl' is not creatable (Main:5)

This is because what the error says.
Curl is NOT creatable. 
Wiki says: This class is the parent class of FtpClient, HttpClient and DictClient. (https://gambaswiki.org/wiki/comp/gb.net.curl)

These children classes are creatable, maybe have a look there.

gbWilly



References:
call WebApi requiring API token authorisationKKing <kicking177@xxxxxxxxx>