Global

Members

(constant) headers :object

Create global constant for headers

Type:
  • object
Source:

Methods

(async) optionsHandler() → {Response}

Handle OPTIONS requests

Source:
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.

Source:
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.

Source:
Returns:
  • The response object
Type
Response