Setting up a REST client
Before we start exploring the APIs, we need a REST client to interface with these services. So, here are two REST clients and how you can set them up.
Setting up cURL
cURL is a command line tool for making HTTP requests. Since Cloud Vision API is accessed over REST, we can use curl as a client for it. You can download cURL for your OS from here: https://curl.haxx.se/download.html. You can test the installation by running the following command:
$ curl --version curl 7.50.0 (x86_64-apple-darwin15.4.0) libcurl/7.50.0 OpenSSL/1.0.2h zlib/1.2.8 Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
To test whether cURL is working as expected, run the following command:
$ curl https://reqres.in/api/users
This hits a public-hosted free mock REST API service named Req
| Res
(https://reqres.in/) and will return a bunch of users. Your output should look something...