Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get external api node js

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;
Comment

PREVIOUS NEXT
Code Example
Javascript :: create node js api 
Javascript :: formik and yup reactjs 
Javascript :: localstorage set 
Javascript :: local database with javascript 
Javascript :: js merge objects 
Javascript :: webpack env argument 
Javascript :: find in array function 
Javascript :: passing html vlaues to Javascript function 
Javascript :: javascript anagram 
Javascript :: modal.hide not working 
Javascript :: how to scrape the web with javascript 
Javascript :: javascript element height 
Javascript :: discord js bot embed user profile picture 
Javascript :: get the last day of the month in js 
Javascript :: jquery change query string parameter value 
Javascript :: how find empty object in js 
Javascript :: .filter js 
Javascript :: javascript get child element by parent id 
Javascript :: javascript select change selected 
Javascript :: get value for radio button in jquery label 
Javascript :: react script 
Javascript :: how set defualt image for dropify 
Javascript :: javascript insert element after 
Javascript :: add on click to div using jquery 
Javascript :: preload 
Javascript :: fuse.js npm 
Javascript :: js remove first element from array 
Javascript :: create a json object in javascript 
Javascript :: add property to all documents mongo 
Javascript :: how to get current month in express js 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =