Is there a way to fetch all entries as a response instead of just one value? For example, when the next value returned by the fetch is {"next":"/heretagium"}, I can replace "/hustengium" with "heretagium" to get the next one. However, my goal is to receive all entries at once.
let next_url = "/hustengium"
let uri = "http://fasttrack.herokuapp.com/"
let h = new Headers()
h.append('Accept', 'application/json')
let req = new Request(uri + next_url, {
method: 'GET',
headers: h,
mode: 'cors'
})
fetch(req )
.then(response => response.json() )
.then(data => {
let str = JSON.stringify(data)
document.querySelector("div#output").textContent = str
console.log(data["next"] )
})
.catch(err => {
let nm = err.name
let msg = err.message
alert(`CATCH: ${nm} ${msg}`)
})