[{"data":1,"prerenderedAt":1130},["ShallowReactive",2],{"navigation":3,"-examples-handle-query":193,"-examples-handle-query-surround":1125},[4,91,138,170,177],{"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},"Utils","/utils","2.utils/0.index",[96,98,103,108,113,118,123,128,133],{"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},"MCP","/utils/mcp","2.utils/6.mcp","material-symbols:swap-calls",{"title":129,"path":130,"stem":131,"icon":132},"More utils","/utils/more","2.utils/9.more","mingcute:plus-line",{"title":134,"path":135,"stem":136,"icon":137},"Community","/utils/community","2.utils/99.community","lets-icons:external",{"title":139,"path":140,"stem":141,"children":142,"icon":144},"Examples","/examples","4.examples/0.index",[143,145,150,154,158,162,166],{"title":139,"path":140,"stem":141,"icon":144},"ph:code",{"title":146,"path":147,"stem":148,"icon":149},"Cookies","/examples/handle-cookie","4.examples/handle-cookie","ph:arrow-right",{"title":151,"path":152,"stem":153,"icon":149},"HTTP QUERY Method","/examples/handle-query","4.examples/handle-query",{"title":155,"path":156,"stem":157,"icon":149},"Sessions","/examples/handle-session","4.examples/handle-session",{"title":159,"path":160,"stem":161,"icon":149},"Static Assets","/examples/serve-static-assets","4.examples/serve-static-assets",{"title":163,"path":164,"stem":165,"icon":149},"Stream Response","/examples/stream-response","4.examples/stream-response",{"title":167,"path":168,"stem":169,"icon":149},"Validate Data","/examples/validate-data","4.examples/validate-data",{"title":171,"path":172,"stem":173,"children":174,"icon":176},"Migration","/migration","5.migration/0.index",[175],{"title":171,"path":172,"stem":173,"icon":176},"icons8:up-round",{"title":178,"path":179,"stem":180,"children":181},"Blog","/blog","99.blog",[182,185,189],{"title":178,"path":179,"stem":183,"icon":184},"99.blog/index","i-lucide-file-text",{"title":186,"path":187,"stem":188,"icon":184},"H3 1.8 - Towards the Edge of the Web","/blog/v1.8","99.blog/1.v1.8",{"title":190,"path":191,"stem":192,"icon":184},"H3 v2 beta","/blog/v2-beta","99.blog/2.v2-beta",{"id":194,"title":151,"body":195,"description":1119,"extension":1120,"meta":1121,"navigation":1122,"path":152,"seo":1123,"stem":153,"__hash__":1124},"content/4.examples/handle-query.md",{"type":196,"value":197,"toc":1107,"icon":149},"minimark",[198,232,252,260,301,479,492,499,530,644,702,708,714,795,809,813,837,915,921,939,1038,1042,1057,1074,1103],[199,200,201,202,214,215,218,219,223,224,227,228,231],"p",{},"The ",[203,204,208,209,213],"a",{"href":205,"rel":206},"https://www.rfc-editor.org/rfc/rfc10008",[207],"nofollow","HTTP ",[210,211,212],"code",{},"QUERY"," method (RFC 10008)"," is like ",[210,216,217],{},"GET"," — ",[220,221,222],"strong",{},"safe, idempotent, and cacheable"," — but carries a query in the request ",[220,225,226],{},"body"," with a ",[210,229,230],{},"Content-Type",". It's the standard answer to \"I need a GET, but my query is too large or too structured for the URL\".",[199,233,234,235,237,238,244,245,251],{},"H3 supports ",[210,236,212],{}," as a first-class method via ",[203,239,241],{"href":240},"/guide/basics/routing#http-query-method",[210,242,243],{},"app.query()",", a high-level ",[203,246,248],{"href":247},"#define-a-query-handler",[210,249,250],{},"defineQueryHandler"," factory, and two lower-level helper utilities.",[253,254,256,257,259],"h2",{"id":255},"define-a-query-handler","Define a ",[210,258,212],{}," Handler",[199,261,262,267,268,271,272,275,276,278,279,282,283,282,286,289,290,293,294,296,297,300],{},[203,263,265],{"href":264},"/utils/request#definequeryhandlerdef",[210,266,250],{}," captures the whole RFC 10008 ceremony: declare the accepted query ",[210,269,270],{},"formats",", and it advertises them via ",[210,273,274],{},"Accept-Query"," on every response (including errors), validates the request ",[210,277,230],{}," (",[210,280,281],{},"400","/",[210,284,285],{},"415",[210,287,288],{},"422",", plus ",[210,291,292],{},"405"," for non-",[210,295,212],{}," methods), and passes the matched media type to the handler as ",[210,298,299],{},"format",":",[302,303,308],"pre",{"className":304,"code":305,"language":306,"meta":307,"style":307},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineQueryHandler, readBody } from \"h3\";\n\napp.query(\n  \"/books\",\n  defineQueryHandler({\n    formats: [\"application/sql\", \"application/jsonpath\"],\n    handler: async (event, { format }) => {\n      const query = await readBody(event, { type: \"text\" });\n      return runQuery(format, query);\n    },\n  }),\n);\n","ts","",[210,309,310,333,340,353,362,371,389,421,449,461,467,473],{"__ignoreMap":307},[311,312,315,319,323,326,330],"span",{"class":313,"line":314},"line",1,[311,316,318],{"class":317},"so5gQ","import",[311,320,322],{"class":321},"slsVL"," { defineQueryHandler, readBody } ",[311,324,325],{"class":317},"from",[311,327,329],{"class":328},"sfrk1"," \"h3\"",[311,331,332],{"class":321},";\n",[311,334,336],{"class":313,"line":335},2,[311,337,339],{"emptyLinePlaceholder":338},true,"\n",[311,341,343,346,350],{"class":313,"line":342},3,[311,344,345],{"class":321},"app.",[311,347,349],{"class":348},"shcOC","query",[311,351,352],{"class":321},"(\n",[311,354,356,359],{"class":313,"line":355},4,[311,357,358],{"class":328},"  \"/books\"",[311,360,361],{"class":321},",\n",[311,363,365,368],{"class":313,"line":364},5,[311,366,367],{"class":348},"  defineQueryHandler",[311,369,370],{"class":321},"({\n",[311,372,374,377,380,383,386],{"class":313,"line":373},6,[311,375,376],{"class":321},"    formats: [",[311,378,379],{"class":328},"\"application/sql\"",[311,381,382],{"class":321},", ",[311,384,385],{"class":328},"\"application/jsonpath\"",[311,387,388],{"class":321},"],\n",[311,390,392,395,398,401,403,407,410,412,415,418],{"class":313,"line":391},7,[311,393,394],{"class":348},"    handler",[311,396,397],{"class":321},": ",[311,399,400],{"class":317},"async",[311,402,278],{"class":321},[311,404,406],{"class":405},"sQHwn","event",[311,408,409],{"class":321},", { ",[311,411,299],{"class":405},[311,413,414],{"class":321}," }) ",[311,416,417],{"class":317},"=>",[311,419,420],{"class":321}," {\n",[311,422,424,427,431,434,437,440,443,446],{"class":313,"line":423},8,[311,425,426],{"class":317},"      const",[311,428,430],{"class":429},"suiK_"," query",[311,432,433],{"class":317}," =",[311,435,436],{"class":317}," await",[311,438,439],{"class":348}," readBody",[311,441,442],{"class":321},"(event, { type: ",[311,444,445],{"class":328},"\"text\"",[311,447,448],{"class":321}," });\n",[311,450,452,455,458],{"class":313,"line":451},9,[311,453,454],{"class":317},"      return",[311,456,457],{"class":348}," runQuery",[311,459,460],{"class":321},"(format, query);\n",[311,462,464],{"class":313,"line":463},10,[311,465,466],{"class":321},"    },\n",[311,468,470],{"class":313,"line":469},11,[311,471,472],{"class":321},"  }),\n",[311,474,476],{"class":313,"line":475},12,[311,477,478],{"class":321},");\n",[199,480,481,482,382,485,488,489,491],{},"Formats may use wildcards (",[210,483,484],{},"application/*",[210,486,487],{},"*/*",") — ",[210,490,299],{}," is always the concrete request media type. The sections below show the lower-level utilities it builds on, for when you need custom behavior.",[253,493,495,496,498],{"id":494},"offer-a-cacheable-get-equivalent","Offer a Cacheable ",[210,497,217],{}," Equivalent",[199,500,501,502,504,505,507,508,510,511,514,515,518,519,521,522,526,527,529],{},"A ",[210,503,212],{}," response is not URL-addressable (and content-keyed ",[210,506,212],{}," caching is not deployed in practice), so browsers and CDNs won't reuse it. RFC 10008 (§2.3) suggests advertising an equivalent, cacheable ",[210,509,217],{}," via the ",[210,512,513],{},"Content-Location"," header. Pass ",[210,516,517],{},"get"," to ",[210,520,250],{}," and register the handler for both methods — the ",[523,524,525],"em",{},"same"," handler serves the advertised ",[210,528,217],{},", so no server-side result store is needed:",[302,531,533],{"className":304,"code":532,"language":306,"meta":307,"style":307},"const searchBooks = defineQueryHandler({\n  formats: [\"application/sql\", \"application/jsonpath\"],\n  get: \"q\",\n  handler: (event, { format, query }) => runQuery(format, query),\n});\n\napp.get(\"/books\", searchBooks).query(\"/books\", searchBooks);\n// QUERY /books     -> 200 + Content-Location: /books?q=\u003Cquery>&format=\u003Cformat>\n// GET /books?q=... -> same result, ordinary HTTP caching applies\n",[210,534,535,550,563,573,600,605,609,633,639],{"__ignoreMap":307},[311,536,537,540,543,545,548],{"class":313,"line":314},[311,538,539],{"class":317},"const",[311,541,542],{"class":429}," searchBooks",[311,544,433],{"class":317},[311,546,547],{"class":348}," defineQueryHandler",[311,549,370],{"class":321},[311,551,552,555,557,559,561],{"class":313,"line":335},[311,553,554],{"class":321},"  formats: [",[311,556,379],{"class":328},[311,558,382],{"class":321},[311,560,385],{"class":328},[311,562,388],{"class":321},[311,564,565,568,571],{"class":313,"line":342},[311,566,567],{"class":321},"  get: ",[311,569,570],{"class":328},"\"q\"",[311,572,361],{"class":321},[311,574,575,578,581,583,585,587,589,591,593,595,597],{"class":313,"line":355},[311,576,577],{"class":348},"  handler",[311,579,580],{"class":321},": (",[311,582,406],{"class":405},[311,584,409],{"class":321},[311,586,299],{"class":405},[311,588,382],{"class":321},[311,590,349],{"class":405},[311,592,414],{"class":321},[311,594,417],{"class":317},[311,596,457],{"class":348},[311,598,599],{"class":321},"(format, query),\n",[311,601,602],{"class":313,"line":364},[311,603,604],{"class":321},"});\n",[311,606,607],{"class":313,"line":373},[311,608,339],{"emptyLinePlaceholder":338},[311,610,611,613,615,618,621,624,626,628,630],{"class":313,"line":391},[311,612,345],{"class":321},[311,614,517],{"class":348},[311,616,617],{"class":321},"(",[311,619,620],{"class":328},"\"/books\"",[311,622,623],{"class":321},", searchBooks).",[311,625,349],{"class":348},[311,627,617],{"class":321},[311,629,620],{"class":328},[311,631,632],{"class":321},", searchBooks);\n",[311,634,635],{"class":313,"line":423},[311,636,638],{"class":637},"sCsY4","// QUERY /books     -> 200 + Content-Location: /books?q=\u003Cquery>&format=\u003Cformat>\n",[311,640,641],{"class":313,"line":451},[311,642,643],{"class":637},"// GET /books?q=... -> same result, ordinary HTTP caching applies\n",[199,645,646,647,649,650,652,653,655,656,282,658,661,662,664,665,668,669,672,673,675,676,678,679,681,682,684,685,687,688,697,698,701],{},"With ",[210,648,517],{}," set, the handler receives the resolved ",[210,651,349],{}," in its context on both paths (read from the body on ",[210,654,212],{},", from the URL param on ",[210,657,217],{},[210,659,660],{},"HEAD","). On ",[210,663,217],{},", the format comes from ",[210,666,667],{},"?format="," (customizable via ",[210,670,671],{},"get: { param, formatParam }",") and may be omitted when exactly one concrete format is accepted; rejections on the ",[210,674,217],{}," path are ",[210,677,281],{},". ",[210,680,513],{}," preserves the request's existing search params and is skipped when the equivalent URL would exceed 2048 characters — very long queries are the reason ",[210,683,212],{}," exists. ",[210,686,660],{}," requests are served too — h3 ",[203,689,691,692,694,695],{"href":690},"/guide/basics/routing#head-requests","automatically matches ",[210,693,217],{}," routes for ",[210,696,660],{},", so the ",[210,699,700],{},"app.get()"," registration covers them.",[253,703,705,706,259],{"id":704},"register-a-query-handler","Register a ",[210,707,212],{},[199,709,710,711,300],{},"Read the request body just like you would for a ",[210,712,713],{},"POST",[302,715,717],{"className":304,"code":716,"language":306,"meta":307,"style":307},"import { readBody } from \"h3\";\n\napp.query(\"/books\", async (event) => {\n  const query = await readBody(event, { type: \"text\" });\n  return runSearch(query);\n});\n",[210,718,719,732,736,761,780,791],{"__ignoreMap":307},[311,720,721,723,726,728,730],{"class":313,"line":314},[311,722,318],{"class":317},[311,724,725],{"class":321}," { readBody } ",[311,727,325],{"class":317},[311,729,329],{"class":328},[311,731,332],{"class":321},[311,733,734],{"class":313,"line":335},[311,735,339],{"emptyLinePlaceholder":338},[311,737,738,740,742,744,746,748,750,752,754,757,759],{"class":313,"line":342},[311,739,345],{"class":321},[311,741,349],{"class":348},[311,743,617],{"class":321},[311,745,620],{"class":328},[311,747,382],{"class":321},[311,749,400],{"class":317},[311,751,278],{"class":321},[311,753,406],{"class":405},[311,755,756],{"class":321},") ",[311,758,417],{"class":317},[311,760,420],{"class":321},[311,762,763,766,768,770,772,774,776,778],{"class":313,"line":355},[311,764,765],{"class":317},"  const",[311,767,430],{"class":429},[311,769,433],{"class":317},[311,771,436],{"class":317},[311,773,439],{"class":348},[311,775,442],{"class":321},[311,777,445],{"class":328},[311,779,448],{"class":321},[311,781,782,785,788],{"class":313,"line":364},[311,783,784],{"class":317},"  return",[311,786,787],{"class":348}," runSearch",[311,789,790],{"class":321},"(query);\n",[311,792,793],{"class":313,"line":373},[311,794,604],{"class":321},[199,796,797,798,800,801,805,806,808],{},"Because ",[210,799,212],{}," carries an attacker-controllable body, ",[203,802,804],{"href":803},"/utils/request#assertbodysizeevent-limit","body-size limits"," apply just like ",[210,807,713],{},".",[253,810,812],{"id":811},"advertise-accepted-formats","Advertise Accepted Formats",[199,814,815,816,822,823,825,826,831,832,834,835,300],{},"Use ",[203,817,819],{"href":818},"/utils/request#appendacceptqueryevent-mediatypes",[210,820,821],{},"appendAcceptQuery"," to tell clients which query formats a resource understands. It sets the ",[210,824,274],{}," response header (a ",[203,827,830],{"href":828,"rel":829},"https://www.rfc-editor.org/rfc/rfc8941",[207],"Structured Fields"," List), and can be set on a plain ",[210,833,217],{}," too so clients can discover formats before sending a ",[210,836,212],{},[302,838,840],{"className":304,"code":839,"language":306,"meta":307,"style":307},"import { appendAcceptQuery } from \"h3\";\n\napp.get(\"/books\", (event) => {\n  appendAcceptQuery(event, [\"application/sql\", \"application/jsonpath\"]);\n  // Accept-Query: application/sql, application/jsonpath\n  return \"Send a QUERY request with a SQL or JSONPath body.\";\n});\n",[210,841,842,855,859,880,897,902,911],{"__ignoreMap":307},[311,843,844,846,849,851,853],{"class":313,"line":314},[311,845,318],{"class":317},[311,847,848],{"class":321}," { appendAcceptQuery } ",[311,850,325],{"class":317},[311,852,329],{"class":328},[311,854,332],{"class":321},[311,856,857],{"class":313,"line":335},[311,858,339],{"emptyLinePlaceholder":338},[311,860,861,863,865,867,869,872,874,876,878],{"class":313,"line":342},[311,862,345],{"class":321},[311,864,517],{"class":348},[311,866,617],{"class":321},[311,868,620],{"class":328},[311,870,871],{"class":321},", (",[311,873,406],{"class":405},[311,875,756],{"class":321},[311,877,417],{"class":317},[311,879,420],{"class":321},[311,881,882,885,888,890,892,894],{"class":313,"line":355},[311,883,884],{"class":348},"  appendAcceptQuery",[311,886,887],{"class":321},"(event, [",[311,889,379],{"class":328},[311,891,382],{"class":321},[311,893,385],{"class":328},[311,895,896],{"class":321},"]);\n",[311,898,899],{"class":313,"line":364},[311,900,901],{"class":637},"  // Accept-Query: application/sql, application/jsonpath\n",[311,903,904,906,909],{"class":313,"line":373},[311,905,784],{"class":317},[311,907,908],{"class":328}," \"Send a QUERY request with a SQL or JSONPath body.\"",[311,910,332],{"class":321},[311,912,913],{"class":313,"line":391},[311,914,604],{"class":321},[253,916,918,919],{"id":917},"validate-the-content-type","Validate the ",[210,920,230],{},[199,922,815,923,929,930,932,933,935,936,938],{},[203,924,926],{"href":925},"/utils/request#requirecontenttypeevent-acceptedtypes",[210,927,928],{},"requireContentType"," to enforce the RFC's error semantics. It returns the matched media type, or throws ",[210,931,281],{}," (missing), ",[210,934,285],{}," (unsupported), or ",[210,937,288],{}," (malformed):",[302,940,942],{"className":304,"code":941,"language":306,"meta":307,"style":307},"import { requireContentType, readBody } from \"h3\";\n\napp.query(\"/books\", async (event) => {\n  const type = requireContentType(event, [\"application/sql\", \"application/jsonpath\"]);\n  const query = await readBody(event, { type: \"text\" });\n  return runQuery(type, query);\n});\n",[210,943,944,957,961,985,1007,1025,1034],{"__ignoreMap":307},[311,945,946,948,951,953,955],{"class":313,"line":314},[311,947,318],{"class":317},[311,949,950],{"class":321}," { requireContentType, readBody } ",[311,952,325],{"class":317},[311,954,329],{"class":328},[311,956,332],{"class":321},[311,958,959],{"class":313,"line":335},[311,960,339],{"emptyLinePlaceholder":338},[311,962,963,965,967,969,971,973,975,977,979,981,983],{"class":313,"line":342},[311,964,345],{"class":321},[311,966,349],{"class":348},[311,968,617],{"class":321},[311,970,620],{"class":328},[311,972,382],{"class":321},[311,974,400],{"class":317},[311,976,278],{"class":321},[311,978,406],{"class":405},[311,980,756],{"class":321},[311,982,417],{"class":317},[311,984,420],{"class":321},[311,986,987,989,992,994,997,999,1001,1003,1005],{"class":313,"line":355},[311,988,765],{"class":317},[311,990,991],{"class":429}," type",[311,993,433],{"class":317},[311,995,996],{"class":348}," requireContentType",[311,998,887],{"class":321},[311,1000,379],{"class":328},[311,1002,382],{"class":321},[311,1004,385],{"class":328},[311,1006,896],{"class":321},[311,1008,1009,1011,1013,1015,1017,1019,1021,1023],{"class":313,"line":364},[311,1010,765],{"class":317},[311,1012,430],{"class":429},[311,1014,433],{"class":317},[311,1016,436],{"class":317},[311,1018,439],{"class":348},[311,1020,442],{"class":321},[311,1022,445],{"class":328},[311,1024,448],{"class":321},[311,1026,1027,1029,1031],{"class":313,"line":373},[311,1028,784],{"class":317},[311,1030,457],{"class":348},[311,1032,1033],{"class":321},"(type, query);\n",[311,1035,1036],{"class":313,"line":391},[311,1037,604],{"class":321},[253,1039,1041],{"id":1040},"full-example","Full Example",[199,1043,1044,1045,1048,1049,1051,1052,1054,1055,808],{},"A self-contained, runnable demo — a ",[210,1046,1047],{},"/books"," resource that accepts SQL-ish and JSONPath queries, validates the ",[210,1050,230],{},", and advertises a cacheable ",[210,1053,217],{}," alternative. It also serves a small interactive page at ",[210,1056,282],{},[1058,1059,1061],"read-more",{"to":1060},"https://github.com/h3js/h3/tree/main/examples/query.mjs",[199,1062,1063,1064,1070,1071,808],{},"See the full ",[203,1065,1067],{"href":1060,"rel":1066},[207],[210,1068,1069],{},"examples/query.mjs"," source, or run it locally with ",[210,1072,1073],{},"node examples/query.mjs",[1075,1076,1077],"note",{},[199,1078,1079,1080,382,1082,1084,1085,1088,1089,1092,1093,1099,1100,808],{},"\nUnlike ",[210,1081,217],{},[210,1083,212],{}," is ",[220,1086,1087],{},"not"," CORS-safelisted, so browsers send a preflight. If you pass an explicit ",[210,1090,1091],{},"methods"," allowlist to ",[203,1094,1096],{"href":1095},"/utils/security#handlecorsevent-options",[210,1097,1098],{},"handleCors",", include ",[210,1101,1102],{},"\"QUERY\"",[1104,1105,1106],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}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 pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}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);}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":307,"searchDepth":335,"depth":335,"links":1108},[1109,1111,1113,1115,1116,1118],{"id":255,"depth":335,"text":1110},"Define a QUERY Handler",{"id":494,"depth":335,"text":1112},"Offer a Cacheable GET Equivalent",{"id":704,"depth":335,"text":1114},"Register a QUERY Handler",{"id":811,"depth":335,"text":812},{"id":917,"depth":335,"text":1117},"Validate the Content-Type",{"id":1040,"depth":335,"text":1041},"Accept safe, cacheable requests that carry a query in the body.","md",{"icon":149},{"icon":149},{"title":151,"description":1119},"i6ZypFnOJ2_sHqzQqQ8nGwAq9HeS2OnuC7T8yp9KaFE",[1126,1128],{"title":146,"path":147,"stem":148,"description":1127,"icon":149,"children":-1},"Use cookies to store data on the client.",{"title":155,"path":156,"stem":157,"description":1129,"icon":149,"children":-1},"Remember your users using a session.",1783670988299]