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