Chapter 8. Working with web services

This chapter covers

  • Making REST requests
  • Detecting timeouts and resuming downloads
  • Passing errors over HTTP
  • Parsing JSON, including arbitrary JSON structures
  • Versioning REST APIs

REST APIs are a cornerstone of the modern internet. They enable cloud computing, have been a pillar in the DevOps and automation movements, and set up client-side web development, among other things. They’re one of the great enablers on the internet.

Although plenty of tutorials about creating and consuming simple APIs are available, what happens when things don’t go as planned? The internet was designed to be fault-tolerant. API requests and servers need to enable that fault tolerance to work.

This chapter starts with ...

Get Go in Practice 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.