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

Re: call WebApi requiring API token authorisation


On Sun, 1 Feb 2026, 03:24 KKing, <kicking177@xxxxxxxxx> wrote:

> Hi Olivier/Lee,
>
> Thank you for your suggestions ...
>
> I do have
>      hClientGet.Get(aHeaderOption, strMyFile)
> working, and the file referenced by strMyFile has the expected response
> content.
> and hClientGet.Status is fine
>
> But
>      sBuffer = Read #hClientGet, Lof(hClientGet)
> returns an empty string. And ideally I'd like the content returned
> inline not in a file.
>
> Suggestions?
>
> K
>

You have to be careful with internet downloads as not all sources have
Content length attribute making the file size unknown.

If the file size is unknown then Lof (length of file) cannot work.

As suggested use peek or download in smaller pieces of a set size until the
stream gets closed.

Respects
BruceS

>

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