rdgr
rdgr
CCConvex Community
Created by rdgr on 11/24/2023 in #support-community
Http Route not working
Hi, I'm trying to create a route so I can send a webhook from a 3rd party to capture some event. The code I have is the following:
http.route({
path: '/test',
method: 'GET',
handler: httpAction(async (ctx, request) => {
console.log('HTTP GET', ctx, request)
return new Response(null, {
status: 200,
statusText: 'OK!',
})
}),
})
http.route({
path: '/test',
method: 'GET',
handler: httpAction(async (ctx, request) => {
console.log('HTTP GET', ctx, request)
return new Response(null, {
status: 200,
statusText: 'OK!',
})
}),
})
After updating my http.ts file, I can the the new function /test showing on my Dashboard > Functions. However, when I call the route using the provided development credentials, I'm always getting a 404.
curl -X GET https://generated-subdomain.convex.cloud/test
404 page not Found
curl -X GET https://generated-subdomain.convex.cloud/test
404 page not Found
To give context, this is to integrate with Stripe and I already checked the two thread I found here. Everything is working but the webhook. Any help? TIA
5 replies