I've been trying to understand why this API call to Open-Meteo fails with HTTPRequest, even though the same URL succeeds in a browser window as well as curl'ing from the command prompt.
load("http.js");
const url = "https://geocoding-api.open-meteo.com/v1/search?name=Canton&format=json"; const req = new HTTPRequest();
var response = req.Get(url);
Result:
!JavaScript http.js line 147: Error: Unable to read status
And this gets logged to the Terminal Server:
TLS ERROR 'Received TLS alert message: Internal error' (-15) setting attribute 6001
TLS ERROR 'Received TLS alert message: Internal error' (-15) setting session active
Does it work if you using HTTP instead of HTTPS? --
Re: HTTPRequest Error: Unable to read status
By: Digital Man to Codefenix on Tue Aug 05 2025 04:22 pm
Does it work if you using HTTP instead of HTTPS? --
No, but standard HTTP doesn't seem to be working at all with open-meteo.com. Not in browsers, not via curl, not with HTTPRequest. Not sure whether it's a temporary thing, or if they simply chose to disable it.
Shouldn't HTTPRequest handle HTTPS anyway?
I tend to point my requests
towards HTTPS URLs if I have the option. Seems odd that HTTPRequest calls to open-meteo.com are failing when it works fine in browsers and via curl.
Try a different known-working HTTPS URL (e.g. https://www.synchro.net) with HTTPRequest to confirm that it's working as expected. If it doesn't work, then the problem is with HTTPS specifically. If it does work, then there's something unique about the requirements of open-meteo.com.
Re: HTTPRequest Error: Unable to read status
By: Digital Man to Codefenix on Tue Aug 05 2025 09:44 pm
Try a different known-working HTTPS URL (e.g. https://www.synchro.net) with HTTPRequest to confirm that it's working as expected. If it doesn't work, then the problem is with HTTPS specifically. If it does work, then there's something unique about the requirements of open-meteo.com.
Yeah, other HTTPS APIs work fine, like those at https://api.weather.gov as well as https://nominatim.openstreetmap.org. HTTPRequest returns status 200 from those.
Sysop: | RunStop |
---|---|
Location: | Guntersville, Al |
Users: | 9 |
Nodes: | 4 (1 / 3) |
Uptime: | 06:22:51 |
Calls: | 20 |
Files: | 8 |
Messages: | 18,382 |