> ## Documentation Index > Fetch the complete documentation index at: https://bunny.net/docs/llms.txt > Use this file to discover all available pages before exploring further. # Modify HTTP headers > Reject requests that use the wrong method and set your own headers on the response. This script answers `GET` with a JSON body and rejects every other method with a 405 and an `Allow` header. ```ts theme={null} import * as BunnySDK from "@bunny.net/edgescript-sdk"; BunnySDK.net.http.serve( async (request: Request): Response | Promise => { const url = new URL(request.url); if (request.method !== "GET") return new Response("Not Allowed", { status: 405, headers: { Allow: "GET", }, }); const responseObj = { hello: "world", }; return new Response(JSON.stringify(responseObj), { headers: { "Content-type": "application/json", }, }); }, ); ``` This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.