Skip to content

Instantly share code, notes, and snippets.

@tommarien
Last active October 25, 2020 19:47
Show Gist options
  • Save tommarien/7400460f11102515172d1dc6f63b05aa to your computer and use it in GitHub Desktop.
Save tommarien/7400460f11102515172d1dc6f63b05aa to your computer and use it in GitHub Desktop.

Network Requests

There are a few ways to get info from an API


What is await?

const response = await fetch("mysite.com/api/dogs")
import fetch from "node-fetch";

const start = await () => { const response = await fetch("https://mysite.com/api/dogs); };


How do Promises work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment