Question: I have a route as followed:

```
var express = require('express');
var router = express.Router();
var request = require('request');

router.get('/', function(req, res, next) {
  request({
    uri: 'http://www.giantbomb.com/api/search',
    qs: {
      api_key: '123456',
      query: 'World of Warcraft: Legion'
    },
    function(error, response, body) {
      if (!error && response.statusCode === 200) {
        console.log(body)
      }
    }
  });
});

module.exports = router;

```

I'm trying to make an API call to the Giant Bomb API to bring back whatever data it has about World of Warcraft.

The problem is, the route just loads; it doesn't do anything or it doesn't time out, it's just continuous loading.

I don't know what I'm doing wrong, but that being said... I don't know what's right either. I'm trying to learn as I go along.

Any help would be great.

Thanks

Answer: 
For Laravel users,

First of all install `npm i axios` package if not.

```
var axios = require('axios');

var config = {
    /* Your settings here like Accept / Headers etc. */
}

axios.get('http://local.dev/api/v1/users', config)
.then(function(response) {
    console.log(response.data);
    console.log(response.status);
    console.log(response.statusText);
    console.log(response.headers);
    console.log(response.config);
});

```

Hopefully it will help someone!
**In 2022**

In node

```
 const fetch = (...args) => import('node-fetch').then(({default: fetch}) => 
 fetch(...args));

app.get('/checkDobleAPI', async (req, res) => {
try {

const apiResponse = await fetch(
 'https://jsonplaceholder.typicode.com/posts' 
)
const apiResponseJson = await apiResponse.json()

console.log(apiResponseJson)
res.send('Running ')
} catch (err) {
console.log(err)
res.status(500).send('Something went wrong')
}
})

```