[{"data":1,"prerenderedAt":475},["ShallowReactive",2],{"navigation":3,"-utils-more":184,"-utils-more-surround":470},[4,91,133,161,168],{"title":5,"path":6,"stem":7,"children":8,"icon":90},"Guide","/guide","1.guide/0.index",[9,12,53,69],{"title":10,"path":6,"stem":7,"icon":11},"Getting Started","pixel:play",{"title":5,"icon":13,"path":14,"stem":15,"children":16,"page":52},"ph:book-open-duotone","/guide/basics","1.guide/1.basics",[17,22,27,32,37,42,47],{"title":18,"path":19,"stem":20,"icon":21},"Request Lifecycle","/guide/basics/lifecycle","1.guide/1.basics/1.lifecycle","icon-park-outline:handle-round",{"title":23,"path":24,"stem":25,"icon":26},"Routing","/guide/basics/routing","1.guide/1.basics/2.routing","solar:routing-bold",{"title":28,"path":29,"stem":30,"icon":31},"Middleware","/guide/basics/middleware","1.guide/1.basics/3.middleware","mdi:middleware-outline",{"title":33,"path":34,"stem":35,"icon":36},"Event Handlers","/guide/basics/handler","1.guide/1.basics/4.handler","mdi:function",{"title":38,"path":39,"stem":40,"icon":41},"Sending Response","/guide/basics/response","1.guide/1.basics/5.response","tabler:json",{"title":43,"path":44,"stem":45,"icon":46},"Error Handling","/guide/basics/error","1.guide/1.basics/6.error","tabler:error-404",{"title":48,"path":49,"stem":50,"icon":51},"Nested Apps","/guide/basics/nested-apps","1.guide/1.basics/7.nested-apps","material-symbols-light:layers-outline",false,{"title":54,"icon":55,"path":56,"stem":57,"children":58,"page":52},"API","material-symbols-light:api-rounded","/guide/api","1.guide/900.api",[59,64],{"title":60,"path":61,"stem":62,"icon":63},"H3","/guide/api/h3","1.guide/900.api/1.h3","material-symbols:bolt-rounded",{"title":65,"path":66,"stem":67,"icon":68},"H3Event","/guide/api/h3event","1.guide/900.api/2.h3event","material-symbols:data-object-rounded",{"title":70,"icon":71,"path":72,"stem":73,"children":74,"page":52},"Advanced","hugeicons:more-01","/guide/advanced","1.guide/901.advanced",[75,80,85],{"title":76,"path":77,"stem":78,"icon":79},"Plugins","/guide/advanced/plugins","1.guide/901.advanced/1.plugins","clarity:plugin-line",{"title":81,"path":82,"stem":83,"icon":84},"WebSockets","/guide/advanced/websocket","1.guide/901.advanced/2.websocket","hugeicons:live-streaming-02",{"title":86,"path":87,"stem":88,"icon":89},"Nightly Builds","/guide/advanced/nightly","1.guide/901.advanced/9.nightly","game-icons:barn-owl","i-ph:book-open-duotone",{"title":92,"path":93,"stem":94,"children":95,"icon":97},"H3 Utils","/utils","2.utils/0.index",[96,98,103,108,113,118,123,128],{"title":92,"path":93,"stem":94,"icon":97},"ph:function-bold",{"title":99,"path":100,"stem":101,"icon":102},"Request","/utils/request","2.utils/1.request","material-symbols-light:input",{"title":104,"path":105,"stem":106,"icon":107},"Response","/utils/response","2.utils/2.response","material-symbols-light:output",{"title":109,"path":110,"stem":111,"icon":112},"Cookie","/utils/cookie","2.utils/3.cookie","material-symbols:cookie-outline",{"title":114,"path":115,"stem":116,"icon":117},"Security","/utils/security","2.utils/4.security","wpf:key-security",{"title":119,"path":120,"stem":121,"icon":122},"Proxy","/utils/proxy","2.utils/5.proxy","arcticons:super-proxy",{"title":124,"path":125,"stem":126,"icon":127},"More utils","/utils/more","2.utils/9.more","mingcute:plus-line",{"title":129,"path":130,"stem":131,"icon":132},"Community","/utils/community","2.utils/99.community","lets-icons:external",{"title":134,"path":135,"stem":136,"children":137,"icon":139},"Examples","/examples","4.examples/0.index",[138,140,145,149,153,157],{"title":134,"path":135,"stem":136,"icon":139},"ph:code",{"title":141,"path":142,"stem":143,"icon":144},"Cookies","/examples/handle-cookie","4.examples/handle-cookie","ph:arrow-right",{"title":146,"path":147,"stem":148,"icon":144},"Sessions","/examples/handle-session","4.examples/handle-session",{"title":150,"path":151,"stem":152,"icon":144},"Static Assets","/examples/serve-static-assets","4.examples/serve-static-assets",{"title":154,"path":155,"stem":156,"icon":144},"Stream Response","/examples/stream-response","4.examples/stream-response",{"title":158,"path":159,"stem":160,"icon":144},"Validate Data","/examples/validate-data","4.examples/validate-data",{"title":162,"path":163,"stem":164,"children":165,"icon":167},"Migration guide for v1 to v2","/migration","5.migration/0.index",[166],{"title":162,"path":163,"stem":164,"icon":167},"icons8:up-round",{"title":169,"path":170,"stem":171,"children":172,"page":-1},"Blog","/blog","99.blog",[173,176,180],{"title":169,"path":170,"stem":174,"icon":175},"99.blog/index","i-lucide-file-text",{"title":177,"path":178,"stem":179,"icon":175},"H3 1.8 - Towards the Edge of the Web","/blog/v1.8","99.blog/1.v1.8",{"title":181,"path":182,"stem":183,"icon":175},"H3 v2 beta","/blog/v2-beta","99.blog/2.v2-beta",{"id":185,"title":124,"body":186,"description":463,"extension":464,"meta":465,"navigation":467,"path":125,"seo":468,"stem":126,"__hash__":469},"content/2.utils/9.more.md",{"type":187,"value":188,"toc":438,"icon":127},"minimark",[189,194,202,206,212,320,324,330,333,339,342,348,351,354,360,363,369,372,375,379,385,388,394,397,401,407,413,419,425,431,434],[190,191,193],"h2",{"id":192},"base","Base",[195,196,198],"h3",{"id":197},"withbasebase-input",[199,200,201],"code",{},"withBase(base, input)",[203,204,205],"p",{},"Returns a new event handler that removes the base url of the event before calling the original handler.",[203,207,208],{},[209,210,211],"strong",{},"Example:",[213,214,219],"pre",{"className":215,"code":216,"language":217,"meta":218,"style":218},"language-ts shiki shiki-themes github-light github-dark github-dark","const api = new H3()\n .get(\"/\", () => \"Hello API!\");\nconst app = new H3();\n .use(\"/api/**\", withBase(\"/api\", api.handler));\n","ts","",[199,220,221,248,276,293],{"__ignoreMap":218},[222,223,226,230,234,237,240,244],"span",{"class":224,"line":225},"line",1,[222,227,229],{"class":228},"so5gQ","const",[222,231,233],{"class":232},"suiK_"," api",[222,235,236],{"class":228}," =",[222,238,239],{"class":228}," new",[222,241,243],{"class":242},"shcOC"," H3",[222,245,247],{"class":246},"slsVL","()\n",[222,249,251,254,257,260,264,267,270,273],{"class":224,"line":250},2,[222,252,253],{"class":246}," .",[222,255,256],{"class":242},"get",[222,258,259],{"class":246},"(",[222,261,263],{"class":262},"sfrk1","\"/\"",[222,265,266],{"class":246},", () ",[222,268,269],{"class":228},"=>",[222,271,272],{"class":262}," \"Hello API!\"",[222,274,275],{"class":246},");\n",[222,277,279,281,284,286,288,290],{"class":224,"line":278},3,[222,280,229],{"class":228},[222,282,283],{"class":232}," app",[222,285,236],{"class":228},[222,287,239],{"class":228},[222,289,243],{"class":242},[222,291,292],{"class":246},"();\n",[222,294,296,298,301,303,306,309,312,314,317],{"class":224,"line":295},4,[222,297,253],{"class":246},[222,299,300],{"class":242},"use",[222,302,259],{"class":246},[222,304,305],{"class":262},"\"/api/**\"",[222,307,308],{"class":246},", ",[222,310,311],{"class":242},"withBase",[222,313,259],{"class":246},[222,315,316],{"class":262},"\"/api\"",[222,318,319],{"class":246},", api.handler));\n",[190,321,323],{"id":322},"event","Event",[195,325,327],{"id":326},"iseventinput",[199,328,329],{},"isEvent(input)",[203,331,332],{},"Checks if the input is an H3Event object.",[195,334,336],{"id":335},"mockevent_request-options",[199,337,338],{},"mockEvent(_request, options?)",[190,340,28],{"id":341},"middleware",[195,343,345],{"id":344},"onerrorhook",[199,346,347],{},"onError(hook)",[203,349,350],{},"Define a middleware that runs when an error occurs.",[203,352,353],{},"You can return a new Response from the handler to gracefully handle the error.",[195,355,357],{"id":356},"onrequesthook",[199,358,359],{},"onRequest(hook)",[203,361,362],{},"Define a middleware that runs on each request.",[195,364,366],{"id":365},"onresponsehook",[199,367,368],{},"onResponse(hook)",[203,370,371],{},"Define a middleware that runs after Response is generated.",[203,373,374],{},"You can return a new Response from the handler to replace the original response.",[190,376,378],{"id":377},"websocket","WebSocket",[195,380,382],{"id":381},"definewebsockethooks",[199,383,384],{},"defineWebSocket(hooks)",[203,386,387],{},"Define WebSocket hooks.",[195,389,391],{"id":390},"definewebsockethandlerhooks",[199,392,393],{},"defineWebSocketHandler(hooks)",[203,395,396],{},"Define WebSocket event handler.",[190,398,400],{"id":399},"adapters","Adapters",[195,402,404],{"id":403},"definenodehandlerhandler",[199,405,406],{},"defineNodeHandler(handler)",[195,408,410],{"id":409},"definenodemiddlewarehandler",[199,411,412],{},"defineNodeMiddleware(handler)",[195,414,416],{"id":415},"fromnodehandlerhandler",[199,417,418],{},"fromNodeHandler(handler)",[195,420,422],{"id":421},"fromwebhandler",[199,423,424],{},"fromWebHandler()",[195,426,428],{"id":427},"tonodehandlerapp",[199,429,430],{},"toNodeHandler(app)",[203,432,433],{},"Convert H3 app instance to a NodeHandler with (IncomingMessage, ServerResponse) => void signature.",[435,436,437],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":218,"searchDepth":250,"depth":250,"links":439},[440,443,447,452,456],{"id":192,"depth":250,"text":193,"children":441},[442],{"id":197,"depth":278,"text":201},{"id":322,"depth":250,"text":323,"children":444},[445,446],{"id":326,"depth":278,"text":329},{"id":335,"depth":278,"text":338},{"id":341,"depth":250,"text":28,"children":448},[449,450,451],{"id":344,"depth":278,"text":347},{"id":356,"depth":278,"text":359},{"id":365,"depth":278,"text":368},{"id":377,"depth":250,"text":378,"children":453},[454,455],{"id":381,"depth":278,"text":384},{"id":390,"depth":278,"text":393},{"id":399,"depth":250,"text":400,"children":457},[458,459,460,461,462],{"id":403,"depth":278,"text":406},{"id":409,"depth":278,"text":412},{"id":415,"depth":278,"text":418},{"id":421,"depth":278,"text":424},{"id":427,"depth":278,"text":430},"More H3 utilities.","md",{"automd":466,"icon":127},true,{"icon":127},{"title":124,"description":463},"AiinwCrVCLTHwkoGEq8bOTBp0cofO19HGqav1v2uRKM",[471,473],{"title":119,"path":120,"stem":121,"description":472,"icon":122,"children":-1},"H3 proxy utilities.",{"title":129,"path":130,"stem":131,"description":474,"icon":132,"children":-1},"H3 utils from community.",1751634864358]