Difficulty: 4/10Route Handlers, HTTP Methods, App RouterThe following HTTP methods are supported:1GET2POST3PUT4PATCH5DELETE6HEAD7OPTIONS.8If an unsupported method is called, Next.js will return a 405 Method Not AllowedScenario Questions0-2 years experience1You need an API endpoint that only accepts POST to submit a contact form. How would you implement that with a Next.js route handler, and what happens if a GET request reaches the same path?2If you create a route handler file but only export a GET function, what response will a DELETE request receive?3Explain what occurs when a browser sends an OPTIONS preflight request to a Next.js route that doesn't export an OPTIONS handler.Follow-up QuestionsWhat response does Next.js send when a request uses a method you didn't export?How would you add custom logic for a method like CONNECT?Can you explain how middleware runs before these method handlers?Suggest Improvement