22 Commits

Author SHA1 Message Date
adam magued
e8f24969d5
feat(routergroup): include HTTP QUERY method in Any (#4878)
Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
2026-10-10 12:16:17 +08:00
Gaurav Patil
b1f77cf536
feat(gin): add support for the HTTP QUERY method (RFC 10008) (#4806)
* feat: add support for the HTTP QUERY method (RFC 10008)

Add a QUERY shortcut on RouterGroup, a gin.MethodQuery constant and a
gin.IQueryRoutes interface for callers that only hold an IRoutes value.

QUERY is deliberately kept out of IRoutes and out of Any:

- Adding a method to IRoutes would break every type outside of Gin that
  implements it, such as test doubles and wrappers.
- Leaving Any untouched keeps existing catch-all routes matching exactly
  the methods they matched before. Match([]string{gin.MethodQuery, ...})
  covers the case where QUERY is wanted alongside other methods.

MethodQuery is declared in Gin because the standard library does not
provide http.MethodQuery yet. The value stays correct once it does.

Ref #4721

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(router): remove duplicate QUERY method

- Consolidate QUERY into the existing router method after merging master
- Preserve the MethodQuery constant and request body documentation

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2026-09-19 14:20:37 +08:00
chenhuiluo
a4ac275e07
test(route): add some test for routergroup (#4291)
Co-authored-by: chenhuiluo <luochenhui@butterfly.tech>
2025-07-19 15:49:41 +08:00
Alireza (Pure)
e02ae6ae61
chore(router): match method added to routergroup for multiple HTTP methods supporting (#3464) 2023-02-06 15:46:42 +08:00
thinkerou
4b68a5f12a
chore: update go.mod and remove space from copyright (#3158)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-28 10:42:28 +08:00
thinkgo
417b142703
feat: add StaticFileFS (#2749)
* RouterGroup.StaticFileFS added
add StaticFileFS ad README

* fix Static content mistake

* update README `tab`
improve StaticFile and StaticFileFS code, use staticFileHandler
2022-03-18 09:52:23 +08:00
Bo-Yi Wu
94153d1e19
test: expose performRequest func (#3012) 2022-01-02 19:07:44 +08:00
ziheng
caf2802593
Improve router group tests (#2787) 2021-07-13 09:44:19 +08:00
thinkerou
d5f12ac6d7
use http method constant (#2155)
* use http method constant

* fix typo
2019-11-29 07:50:49 +08:00
田欧
f45c928a15 chore: use http.Status* instead of hard code (#1482) 2018-08-14 09:51:56 +08:00
田欧
eeb57848ca update assert param(expect, actual) position (#1177) 2017-11-21 21:18:45 +08:00
Manu Mtz-Almeida
fc5e355724 BasePath is not longer an exported field, but a method instead 2015-07-08 04:27:23 +02:00
Manu Mtz-Almeida
8f3047814e Comments + IRoutes + IRouter + unexported AbortIndex 2015-07-02 20:24:54 +02:00
Steeve Chailloux
4238c5b83d make routesInterface exported 2015-06-23 15:57:21 -05:00
Manu Mtz-Almeida
4998bc2b2e Fixes pipeline API 2015-06-11 01:02:38 +02:00
Manu Mtz-Almeida
92475baba6 Adds more units tests 2015-06-04 04:50:40 +02:00
Manu Mtz-Almeida
ee021d06ea More unit tests 2015-06-04 04:32:18 +02:00
Manu Mtz-Almeida
cac77e04e3 Adds option for listing directory files + better unit tests 2015-05-21 17:01:13 +02:00
Manu Mtz-Almeida
72f200ac56 Adds StaticFile() 2015-05-21 16:59:58 +02:00
Manu Mtz-Almeida
e59475c615 Drops LINK and UNLINK shortcuts 2015-05-20 00:32:06 +02:00
Manu Mtz-Almeida
3066c35754 Renames RouterGroup.absolutePath to .BasePath 2015-05-16 18:08:19 +02:00
Manu Mtz-Almeida
0a192fb0fa Tons of unit tests 2015-04-09 12:15:02 +02:00