Fetch
This commit is contained in:
14
main.js
14
main.js
@@ -23,16 +23,10 @@ function parseName() {
|
|||||||
PapaParse(department, classNum, className);
|
PapaParse(department, classNum, className);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function PapaParse(department, num, name) {
|
function PapaParse(department, num, name) {
|
||||||
const fileInput = await fetch('https://github.com/DereC4/ut-grade-viewer/blob/master/data/2022%20Fall.json', {
|
fetch('https://github.com/DereC4/ut-grade-viewer/blob/master/data/2022%20Fall.json')
|
||||||
method: 'GET',
|
.then(response => response.text())
|
||||||
headers: {
|
.then(text => console.log(text))
|
||||||
'Accept': 'application/json',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(response => console.log(JSON.stringify(response)))
|
|
||||||
console.log(fileInput);
|
|
||||||
let gradeObj = [];
|
let gradeObj = [];
|
||||||
// PapaParse.parse(
|
// PapaParse.parse(
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user