You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not enable QUERY on AsyncCallbackJsonWebHandler by default. Map the platform http_method enumerator only when HTTP_PARSER_HAS_QUERY is defined (enum members are not preprocessor macros). Add Accept-Query and a Json example curl.
Copy file name to clipboardExpand all lines: docs/requests.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,19 @@ request->contentLength(); // size_t: ContentLength of the request (not availabl
14
14
request->multipart(); // bool: True if the request has content type "multipart"
15
15
```
16
16
17
-
`HTTP_QUERY` is [RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html): a safe, idempotent method that carries the query in the request body (same body path as POST/PUT/PATCH whenever `Content-Length` or chunked transfer is present). `AsyncCallbackJsonWebHandler` accepts QUERY with `Content-Type: application/json`. Unknown methods still abort the connection.
17
+
`HTTP_QUERY` is [RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html): a safe, idempotent method that carries the query in the request body (same body path as POST/PUT/PATCH whenever `Content-Length` or chunked transfer is present). Unknown methods still abort the connection.
18
+
19
+
`AsyncCallbackJsonWebHandler` does **not** enable QUERY by default. Call `setMethod(HTTP_QUERY)` (alone or combined with POST/PUT). QUERY still requires `Content-Type: application/json` (or MessagePack). Advertise supported query media types with `Accept-Query` (`asyncsrv::T_Accept_Query`), e.g. `application/json`.
20
+
21
+
Platform `http_method` mapping is compiled in only when the platform parser defines `HTTP_PARSER_HAS_QUERY` (ESP-IDF after QUERY support). The library parser always recognizes `QUERY`.
0 commit comments