Chapter 15

Consuming Web APIs Using Go

IN THIS CHAPTER

Bullet Knowing what a web API is and what it does

Bullet Getting data from web services

When you have a good foundation in the Go programming language, it’s time to put things into action! And you do that with web application programming interfaces (APIs).

An API is a set of specifications that allows programs to talk to one another. And a web API uses the web technologies (specifically the Hypertext Transfer Protocol, or HTTP) to allow clients to talk to servers to exchange information.

Web APIs are very useful building blocks that enable applications to get data from multiple sources. Organizations big and small can create innovation applications by leveraging the various web APIs available, all without needing to reinvent the wheel. In this chapter, I show you how to use Go to communicate with web APIs.

Without further ado, let’s go!

Understanding Web APIs

Before I get to web APIs, let me get you thinking about web applications. You probably use web applications every day. A good example of a web application is Amazon.com. When you want to buy something at Amazon, you go to www.amazon.com and start adding items to your shopping cart. When you’re done shopping, you click the button to check out and — voilá! — after you confirm your ...

Get Go Programming Language For Dummies 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.