scottcreynolds / javascript-fetch-lab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JavaScript fetch() Lab

Objectives

  1. Use fetch() to get remote data from GitHub
  2. Use fetch() to write data to GitHub

Introduction

Make sure students understand the ins and outs of fetch() -- e.g., the options object, headers, etc.

Walk students through signing up for a GitHub auth token (click avatar in upper right, click "Settings", "click "Personal access tokens" on the side bar, generate a new token)

Have students practice creating issues on a repository (it could even be this repository)

For the tests, redefine a global fetch as a spy and make sure that the student's functions are calling the right endpoint(s)

fetch()

Resources

About

License:Other


Languages

Language:JavaScript 65.1%Language:HTML 34.9%