Authentication – adding HTTP headers
So far, we have been using the GitHub API without authentication. This limits us to sixty requests per hour. Now that we can query the API in parallel, we could exceed this limit in seconds.
Fortunately, GitHub is much more generous if you authenticate when you query the API. The limit increases to 5,000 requests per hour. You must have a GitHub user account to authenticate, so go ahead and create one now if you need to. After creating an account, navigate to https://github.com/settings/tokens and click on the Generate new token button. Accept the default settings and enter a token description and a long hexadecimal number should appear on the screen. Copy the token for now.
HTTP – a whirlwind overview
Before using our newly generated token, let's take a few minutes to review how HTTP works.
HTTP is a protocol for transferring information between different computers. It is the protocol that we have been using throughout the chapter, though Scala hid the details...