Writing a client for a REST API will not only help you better understand the API in question, but also gives you a useful tool for all future applications using that API. This will explore structuring a client and show some strategies that you can immediately take advantage of.
For this client, we'll assume that the authentication is handled by basic auth, but it would also be possible to hit an endpoint to retrieve a token, and so on. For the sake of simplicity, we'll assume our API exposes one endpoint, GetGoogle(), which returns that status code returned from doing a GET request to https://www.google.com.