Now we need to make our HTTP method function. These functions will use the wrapper to execute the browser Fetch API and return the response.
Follow these steps to create each one of the API method calls:
- Let's create a new file called fetchApi.js in the src/http folder.
- We need to import the baseHttp from the file we created in the first step:
import baseHttp from './baseFetch';
Now in the following parts, we will create each one of the HTTP methods that will be available in our wrapper.