Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/content/docs/pages/functions/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ The following methods can be used to configure your Pages Function.

### `onRequests`


The `onRequest` method will be called unless a more specific `onRequestVerb` method is exported. For example, if both `onRequest` and `onRequestGet` are exported, only `onRequestGet` will be called for `GET` requests.

* <code>onRequest(context[EventContext](#eventcontext))</code> Response | Promise\<Response>
* This function will be invoked on all requests no matter the request method.
* This function will be invoked on all requests no matter what the request method is, as long as no specific request verb (like one of the methods below) is exported. It also won't be invoked if `next(context.request)` is called from a `onRequestVerb` function.
* <code>onRequestGet(context[EventContext](#eventcontext))</code> Response | Promise\<Response>
* This function will be invoked on all `GET` requests.
* <code>onRequestPost(context[EventContext](#eventcontext))</code> Response | Promise\<Response>
Expand Down