procedure StartBOTT_API(); var Client: HttpClient; HttpRespone: HttpResponseMessage; ResponseText: Text; Url: Text; ResTxt: Text; begin Url := 'https://api.exchangeratesapi.io/latest'; Client.Get(Url, HttpRespone); if HttpRespone.IsSuccessStatusCode() then begin HttpRespone.Content.ReadAs(ResTxt); Message(ResTxt); end else Message('Error: %1', HttpRespone.HttpStatusCode); end;
Answers
Your code works, I changed a little to get an ouptut
and is ok:
Maybe your extension is not allowed to use httpclient requests, check this in the extension:
Regards.
Thanks for your reply
I'm already to allow httpclient and use your code but get same error
I try to debug my code is break at this point
Do you have any recommendations?
Have you tried to call the URL from a browser ?
What is your environment (docker, local installaction, etc.) ?
Regards
Yes, I can call data from browser.
I using docker environment
And the docker container has the port 443 open.
Regards.
I try to use environment on localhost is works.
I think my docker is broken
thank you very much for your help