eastbayeff

Untitled

Mar 15th, 2022
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fetch(fetchURL, {
  2.     method: "GET",
  3.     withCredentials: true,
  4.     headers: {
  5.       "X-Api-Key": apiKey,
  6.       //"Content-Type": "application/json"
  7.     }
  8.   })
  9.     .then(resp => resp.json())
  10.     .then(function(data) {
  11.       console.log(data);
  12.     })
  13.     .catch(function(error) {
  14.       console.log(error);
  15.     });
Advertisement
Add Comment
Please, Sign In to add comment