[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
call WebApi requiring API token authorisation
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: call WebApi requiring API token authorisation
- From: KKing <kicking177@xxxxxxxxx>
- Date: Tue, 20 Jan 2026 09:46:09 +1030
- To: user@xxxxxxxxxxxxxxxxxxxxxx
call WebApi requiring API token authorisationWhat'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)On same unit, I can from terminal run Curl command with parameters and all works fine.
Is there another component or step to allow this to work in Gambas? or should I be using httpclient now? If the latter is there good example to follow? K