In this chapter, you will be exploring the topic of remote data, learning what exactly it is, types of it, how to interact with it, and what to consider when doing so. You will then build upon this learning by building a new widget, the Weather Widget, to display the current weather. This will be done by interacting directly with the Open Weather API. You will get exposure to handling HTTP requests and responses with an API, how to handle the response being in a JSON format, and the varying levels of flexibility when mapping to the JSON data. You will finish off by simplifying the implementation with a fantastic NuGet package that generates source code for you, simply from an interface you define to represent the web service.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Remote Data

  • Shaun Lawrence

摘要

In this chapter, you will be exploring the topic of remote data, learning what exactly it is, types of it, how to interact with it, and what to consider when doing so. You will then build upon this learning by building a new widget, the Weather Widget, to display the current weather. This will be done by interacting directly with the Open Weather API. You will get exposure to handling HTTP requests and responses with an API, how to handle the response being in a JSON format, and the varying levels of flexibility when mapping to the JSON data. You will finish off by simplifying the implementation with a fantastic NuGet package that generates source code for you, simply from an interface you define to represent the web service.