How to do it...
The scenarios described in this recipe are very common, so this demo will have to face real timings and real problems. We'll do, as a long-running request, a REST call to an open web service that provides weather forecasts. I've used this app for a while and the forecasts even seem accurate! Cool!
The service is provided by http://openweathermap.org and we will issue the REST request at the following endpoint: http://api.openweathermap.org/data/2.5/forecast.
All the parameters required for the request will be defined at runtime by the app. To use this service, you need an API key. To get the API key, follow the instructions here: http://openweathermap.org/appid. After obtaining the API key, we can start to create the app: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access