The HTTP request
After configuring the endpoint, we will create the class to connect to our API. Let's start to identify the basics for our HTTP request.
What we need to create an HTTP request is our endpoint URL. We only configured the basic URL, but we didn't add the available resource.
If we want to use different resources, we need to define different endpoints. In the documentation of our API, you can find different resources (TV, search, movies). Each of these resources has its own definition. In one resource, you probably have some sub-resources, such as in the Search resource, you will find some sub-resources (for example, Search Companies or Search People). Each of these resources and sub-resources has a different endpoint URL.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access