When I build a front end the first step is to test the API calls in the browser. The easiest way to do this is to use the google chrome developer tools and the window.fetch API.
The API I am using is the GetHomii API for calculating how much someone can borrow by using how much they believe they can pay each week or how much rent they are currently paying.
The API URL is:
And the results are:
The first step is to open google chrome and to put the url into the browser. This is to make sure that the API is available and ready to accept requests and return results.
As you can see the API is ready and the next step is to then press F12 to open the google developer tools and then to navigate to the Console tab on the developer tools.
First thing to do is to run the
window.fetch('https://gethomii-gateway.azurewebsites.net/api/v5/calculators/loanamount?rent=750&isInvestor=N').then(result => console.log(result))