mirror of
https://github.com/gin-gonic/gin.git
synced 2026-10-28 11:04:42 +08:00
docs: include HTTP QUERY method in RouterGroup.Any (#4879)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
1 parent
ea9fab99e0
commit
0f09c3a9b4
1 file changed
+1
@@ -169,6 +169,7 @@ req := httptest.NewRequest(gin.MethodQuery, "/search", body)
|
||||
|
||||
Keep in mind:
|
||||
|
||||
- `router.Any` also registers `QUERY` alongside standard HTTP methods. Handlers registered with `Any` should respect QUERY's safe and idempotent semantics when processing that method.
|
||||
- `QUERY` is not part of the `gin.IRoutes` interface. `*gin.Engine` and `*gin.RouterGroup` expose it directly; if you only hold an `IRoutes` value, assert to `gin.IQueryRoutes` first.
|
||||
|
||||
```go
|
||||
|
||||
Reference in new issue
Block a user