Summary
In this chapter we explored using web APIs to retrieve data from remote servers. We saw how to use the WebRequest
object to make this task approachable. We also revisited ideas you’ve seen in prior courses like the IDisposable
interface and using
statements to work with unmanaged objects. We saw how to consume XML data we receive as a response from a web API.
We also discussed using async
methods to allow our programs to continue to respond to user input and incoming web requests while processing long-running tasks in parallel. Finally, we discussed RESTful routes, a standardized way of determining the routes for your web API.