Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cloudflare/worker-template-fetch


https://github.com/cloudflare/worker-template-fetch

Last synced: 29 days ago
JSON representation

Awesome Lists containing this project

README

        

## fetch

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`](https://github.com/cloudflare/worker-template-fetch/blob/master/index.js) is the content of the Workers script.

#### Wrangler
To generate using [wrangler](https://github.com/cloudflare/wrangler)

```
wrangler generate myApp https://github.com/cloudflare/worker-template-fetch
```

#### Serverless
To deploy using serverless add a [`serverless.yml`](https://serverless.com/framework/docs/providers/cloudflare/) file.