global
fetch(url, options)
Fetches a resource from the network.
Parameters
urlThe URL of the resource you want to fetch.
optionsOptionalThe
Optionsthat you want to apply to the request.
Return value
The Response object.
Example
// Fetches a random quote from https://zenquotes.io
const response = fetch('https://zenquotes.io/api/random');
const [quote] = JSON.parse(response.getContentText());
console.info(`"${quote.q}"\n-- ${quote.a}`)