Class for accessing Fastly Edge Dictionaries.
Note: Can only be used when processing requests, not during build-time initialization.
In this example we have an Edge Dictionary named 'animals' and we return the 'cat' entry as the response body to the client.
async function app (event) { const config = new ConfigStore('animals'); return new Response(config.get('cat')); } addEventListener("fetch", event => event.respondWith(app(event)));
```
Creates a new ConfigStore object
Throws an Error if no Config Store exists with the provided name
Error
Get a value for a key in the config-store. If the provided key does not exist in the Config Store then this returns null.
null
Throws an TypeError if the provided key is longer than 256 characters.
TypeError
Generated using TypeDoc
Class for accessing Fastly Edge Dictionaries.
Note: Can only be used when processing requests, not during build-time initialization.
Example
In this example we have an Edge Dictionary named 'animals' and we return the 'cat' entry as the response body to the client.