Handle an HTTP request
Return a JSON response from your integration's public HTTP endpoint
Before you begin
Add a request handler
export default createIntegration({
fetch: async (request, context) => {
if (request.method !== "POST") {
return new Response("Method not allowed", { status: 405 });
}
console.log("Received a request");
return new Response(JSON.stringify({ received: true }), {
headers: {
"Content-Type": "application/json",
},
});
},
});Deploy the integration
Send a test request
Add your integration logic
Last updated
Was this helpful?