Connecting to an External API

Solved by self.

In the end, I just used a JS Query instead and used the following code:

let url = 'https://www.myurl.com';

fetch(url)
.then(res => res.json())
.then(out =>
  console.log('Checkout this JSON! ', out))
.catch(console.log('We have a problem, Houston.'));

Obviously, you will want to return the JSON instead. Not do funny messages :wink:

1 Like