Discover OpenWeatherMap APIs

Since httpClient is strongly typed, we need to create a new interface that conforms to the shape of the API we'll call. To be able to do this, you need to familiarize yourself with the Current Weather Data API.

  1. Read documentation by navigating to http://openweathermap.org/current:
OpenWeatherMap Current Weather Data API Documentation

You will be using the API named By city name, which allows you to get current weather data by providing the city name as a parameter. So, your web request will look like this:

api.openweathermap.org/data/2.5/weather?q={city name},{country code}
  1. On the documentation page, click on ...

Get Angular 6 for Enterprise-Ready Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.