Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Windows / Need asy API-Request Example with JSON-String output please

Author
Message
Lindwedler
7
Years of Service
User Offline
Joined: 14th Jun 2017
Location: Germany, Lindwedel in Lower Saxony
Posted: 2nd Oct 2024 11:35 Edited at: 2nd Oct 2024 11:56
Can anyone help me with a small code snippet which make a API request (http get) for a weather api by example?

I try it but i fail, i need an easy example to understand how it works.

for the API the following is set:

// API-Key OpenWeatherMap
apiKey$ = "YOUR_API_KEY" // API Key setting

// City Location for weather
city$ = "Hamburg"

// URL API-Request
url$ = "http://api.openweathermap.org/data/2.5/weather?q=" + city$ + "&appid=" + apiKey$ + "&units=metric"

--------------

Thank you for the help/support
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 3rd Oct 2024 20:14
without knowing the error you're receiving, i'd skip the "http://" part, for one.

i haven't tried the openweather API but this DNS lookup code is still valid and may offer some insight.

Login to post a reply

Server time is: 2024-11-23 08:53:00
Your offset time is: 2024-11-23 08:53:00