-
SummaryI am using app router... The structure goes like this: app - api - sendgrid - route.js I go to: http://localhost:3000/api/sendgrid and get 404 | This page could not be found... <--- how can I fix this??? ^^^ This page is supposed to be a POST page to receive and record email from SendGrid and store them at Neon... but doesn't seem to be doing anything. The code goes like: ` // Required to allow formidable to parse the request body // Helper to parse multipart/form-data using formidable with a Promise
}); export async function POST(req) {
} catch (error) { |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, when you navigate to Since this sends an email, POST is correct. Use Postman or something like that, with the correct HTTP method (POST), to see results. |
Beta Was this translation helpful? Give feedback.
Hi, when you navigate to
http://localhost:3000/api/sendgrid
with a browser, it does a GET request. You have only defined a POST handler.Since this sends an email, POST is correct. Use Postman or something like that, with the correct HTTP method (POST), to see results.