We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a47eb8 commit 51e6d12Copy full SHA for 51e6d12
docs/content/docs/foundations/hooks.mdx
@@ -216,13 +216,9 @@ export async function webhookWithStaticResponse() {
216
"use workflow";
217
218
const webhook = createWebhook({
219
- respondWith: new Response(
220
- JSON.stringify({ success: true, message: "Webhook received" }),
221
- {
222
- status: 200,
223
- headers: { "Content-Type": "application/json" }
224
- }
225
- )
+ respondWith: Response.json({
+ success: true, message: "Webhook received"
+ }),
226
});
227
228
const request = await webhook;
0 commit comments