Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 324 Bytes

NodeJs-Unirest.md

File metadata and controls

20 lines (14 loc) · 324 Bytes
var unirest = require("unirest");

var req = unirest("GET", "https://api.storyblok.com/v1/cdn/stories/home");

req.query({
  "token": "xs8KfuZGvQVOM824AFUQDQtt"
});

req.headers({
  "cache-control": "no-cache"
});


req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});