From the course: Xamarin Essential Training: Create Your First App

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Challenge

Challenge

- In this first challenge in the course I'm going to have two different steps for you to try. The first one is to just add a new package to your library project. I want you to take the straightforward approach and add the Microsoft dot extensions dot http new get package to your library project by using that managed project dialogue. In the second step, you're going to add a little bit of code. So I want you to update that product service class in our library. We already have a method in there to go out and get a list of products. Now, I want you to add a method called Get Product that's going to accept an integer ID parameter. So it'll be called ID of type int. That's the one parameter that method takes. And then implement the method to call our API to return a single product. You can use the existing code as your example of how to do that, and note that the URL for a single product is a little different. It's still…

Contents