Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs http get request to external server

const request = require("request");
const url = "<a href="https://my-json-server.typicode.com/edurekaDemo/noderequest/db">https://my-json-server.typicode.com/edurekaDemo/noderequest/db</a>";
request.get(url, (error, response, body) => {
let json = JSON.parse(body);
console.log(body);
});
Source by www.edureka.co #
 
PREVIOUS NEXT
Tagged: #nodejs #http #request #external #server
ADD COMMENT
Topic
Name
8+8 =