You'll want to `JSON.stringify` the `body`, but otherwise yes ๐
You'll want to 
JSON.stringify the body, but otherwise yes JSON.stringify(body){key: value} structure is called in JS.async function fetchProductsAsJSON() {
const response = await fetch('https://mydomain.com/api/hello');
// waits until the request completes...
console.log(response);
}
fetchProductsAsJSON();const json = await response.json()mdn response json or mdn fetch will both have it
init on here https://developer.mozilla.org/en-US/docs/Web/API/fetch
context.env.VARIABLE_NAMEplatform is always undefined in the endpoints. How can I fix this so I can access platform.env while testing locally with wrangler2?platform is always undefined: https://github.com/sveltejs/kit/tree/master/packages/adapter-cloudflare#environment-variablesnext() instead context.next() in your exampleconst file = await next() to get the response and then run an HTMLRewriter on topasync function fetchProductsAsJSON() {
const response = await fetch('https://mydomain.com/api/hello');
// waits until the request completes...
console.log(response);
}
fetchProductsAsJSON();fetch(url, {
headers: {
'foo': 'bar'
}
}