Fetch
The fetch method in your created integration allows you to handle incoming requests to your integration.
It can be defined in an async function inside the createIntegration
call, and includes 2 arguments. The function should return a valid Response
.
request
request
The incoming request object that is sent to your integration. See the MDN docs to learn more.
context
context
Context about your integration, including the environment and installation details the integration is running in.
This object contains the following keys:
Name | Description |
---|---|
| Environment of the integration. See the Environment section to learn more. |
| Authenticated client to the GitBook API. See the API docs to learn more. |
Last updated