Examples of making fetch requests from within your Worker script including generating JSON post requests then reading in the resulting response body, aggregating multiple requests into one response, and following/catching redirects.
index.js
is the content of the Workers script.
To generate using wrangler
wrangler generate myApp https://github.com/cloudflare/worker-template-fetch
To deploy using serverless add a serverless.yml
file.