summaryrefslogtreecommitdiff
path: root/js-scripts/queryJsonPlaceholder.js
blob: e8b7ea297c3864af847819c69c886893b2c94b21 (plain)
1
2
3
4
5
6
7
// Testing to see if I can make API calls on a site that has CSP headers. However,
// this certain site does not have those headers on their error page, so by creating
// an iframe on the document root with this source we can make an api call to another
// service, maybe?
fetch('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => response.json())
  .then(json => console.log(json))