We will now create a new Xamarin.Forms (PCL) solution named Weather. It will allow us to write a location in a text box and it will provide the weather condition of the location using an external service provided as RESTful APIs.
We will use the APIs provided from http://openweathermap.org/api.
We will start importing all the base code we've written for the previous projects and we can add an empty class called HTTPHelper
in the Services
subfolder of the Base layer.
In this class, we will define each method to make a data request:
public class HTTPHelper { public HTTPHelper () { } public async Task<string> GET ( string url ) { return "//To implement"; } public async Task<string> POST ( string url ) { return "//To implement"; } public async Task<string> PUT ( string url ) { return...