Members
(constant) headers :object
Create global constant for headers
Type:
- object
Methods
(async) optionsHandler() → {Response}
Handle OPTIONS requests
Returns:
- The response object
- Type
- Response
(async) postHandler(request, env) → {Response}
Handle POST requests
Parameters:
Name | Type | Description |
---|---|---|
request |
Request | The request object |
env |
Object | The env parameter contains the bindings assigned to the worker. Bindings are used for interacting with the cloudflare KV database and sending email. |
Returns:
- The response object
- Type
- Response
(async) sendEmail(form_data, env) → {Response}
Send email
Parameters:
Name | Type | Description |
---|---|---|
form_data |
Object | Data from the form submission |
env |
Object | The env parameter contains the bindings assigned to the worker. Bindings are used for interacting with the cloudflare KV database and sending email. |
Returns:
- The response object
- Type
- Response