> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://akamai.ferndocs.com/edge-workers/about-the-javascript-api/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://akamai.ferndocs.com/_mcp/server. # About the JavaScript API Review these details when designing EdgeWorkers functions. To learn more about the specific HTTP events that can execute an EdgeWorkers script, see [EdgeWorkers event model](event-handler-functions.md). > 👍 For information about the supported HTTP methods see, [Event handler methods](event-handler-functions.md#event-handler-methods). **Use case support matrix**\ View the event handler and JavaScript method you can use to achieve an EdgeWorkers use case. ##
Event Handler x Use Cases Methods
onClientRequest Redirect Management Traffic Filtering Allow / Deny Static Response Offload respondWith()
Header Management getHeader() setHeader() addHeader() removeHeader()
Cookie Management cookies toHeader() get() getAll() names() add() delete() See the note below.
Delivery Property Flow Control getVariable() setVariable()
Conditionally Route Traffic Personalization route()
Cache Key Manipulation excludeQueryString() includeQueryString() includeQueryArgument() includeCookie() includeHeader() includeVariable()
onClientResponse Redirect Management Immediate HTML responses Refer to the [Product limits](limitations.md) for information about the supported response size. respondWith()
onOriginRequest onOriginResponse onClientResponse Header Management getHeader() setHeader() addHeader() removeHeader()
Cookie Management cookies toHeader() get() getAll() names() add() delete() See the note below.
Delivery Property Flow Control getVariable() setVariable()
responseProvider Response Orchestration getHeader() getHeaders() getVariable() text() json() arrayBuffer() createResponse() httpRequest() To use the `responseProvider` functions, you need to import the create-response, streams, text-encode-transform, and http-request modules.
Manipulate the response (body, headers) createResponse()
> 📘 Cookie Management methods > > To use theCookie Management methods, you need to import the cookies module.