Kevin Wan
2588a36555
feat: support rest.WithCorsHeaders to customize cors headers ( #4284 )
2024-07-30 17:29:44 +08:00
Kevin Wan
5dd6f2a43a
feat: support embed file system to serve files in rest ( #4253 )
2024-07-17 16:21:08 +08:00
yonwoo9
c02fb3acab
chore: initialize some slice type variables ( #4249 )
2024-07-15 15:50:42 +00:00
Kevin Wan
ec86f22cd6
feat: support file server in rest ( #4244 )
2024-07-13 19:58:35 +08:00
Kevin Wan
42e0a6f90c
chore: refactor errors to use errors.Is ( #3654 )
2023-10-21 00:00:57 +08:00
Kevin Wan
60a13f1e53
chore: add more tests ( #3018 )
2023-03-12 20:42:50 +08:00
sniperwzq
3e093bf34e
defines the method to customize http server ( #2171 )
2023-03-11 23:15:00 +08:00
Kevin Wan
dd294e8cd6
fix : #2700 , timeout not enough for writing responses ( #2738 )
...
* fix : #2700 , timeout not enough for writing responses
* fix: test fail
* chore: add comments
2023-01-02 13:51:15 +08:00
JackSon_tm.m
3e9d0161bc
add ServeHTTP to Server/Engin for doing Httptest ( #2704 )
2023-01-02 00:24:58 +08:00
Kevin Wan
4cb68a034a
fix #2163 ( #2283 )
2022-08-24 20:19:53 +08:00
Kevin Wan
3bad043413
chore: refactor ( #2130 )
2022-07-11 23:50:50 +08:00
虫子樱桃
d71b3c841f
feat:Add Routes
method for server ( #2125 )
...
Co-authored-by: czyt <czyt@w.cn>
2022-07-11 23:23:38 +08:00
Kevin Wan
47c49de94e
feat: rest.WithChain to replace builtin middlewares ( #2033 )
...
* feat: rest.WithChain to replace builtin middlewares
* chore: add comments
* chore: refine code
2022-06-19 17:41:33 +08:00
Kevin Wan
018ca82048
chore: refactor to simplify disabling builtin middlewares ( #2031 )
...
* chore: refactor to simplify disabling builtin middlewares
* chore: rename methods
2022-06-18 20:16:34 +08:00
magickeha
6976ba7e13
add user middleware chain function ( #1913 )
...
* add user middleware chain function
* fix staticcheck SA4006
* chang code Implementation style
Co-authored-by: kemq1 <kemq1@spdb.com.cn>
2022-06-18 18:45:47 +08:00
Kevin Wan
b6b96d9dad
feat: print routes ( #1964 )
...
* feat: print rest routes
* feat: print rest routes
2022-06-04 13:26:14 +08:00
Kevin Wan
2b9fc26c38
refactor: guard timeout on API files ( #1726 )
2022-03-31 21:39:02 +08:00
Xiaoju Jiang
321dc2d410
Added support for setting the parameter size accepted by the interface and custom timeout and maxbytes in API file ( #1713 )
...
* Added support for setting the parameter size accepted by the interface
* support custom timeout and maxbytes in API file
* support timeout used unit
* remove goctl maxBytes
2022-03-31 20:20:00 +08:00
Kevin Wan
3b7ca86e4f
chore: add unit tests ( #1615 )
...
* test: add more tests
* test: add more tests
2022-03-04 17:54:09 +08:00
Kevin Wan
842656aa90
feat: log 404 requests with traceid ( #1554 )
2022-02-19 20:50:33 +08:00
Kevin Wan
a91c3907a8
feat: rename module from tal-tech to zeromicro ( #1413 )
2022-01-04 15:51:32 +08:00
Kevin Wan
3dda557410
chore: only allow cors middleware to change headers ( #1276 )
2021-11-26 14:14:06 +08:00
Kevin Wan
0395ba1816
feat: add rest.WithCustomCors to let caller customize the response ( #1274 )
2021-11-25 23:03:37 +08:00
Kevin Wan
28409791fa
feat: support CORS, better implementation ( #1217 )
...
* feat: support CORS, better implementation
* chore: refine code
2021-11-09 20:35:57 +08:00
Kevin Wan
c28e01fed3
feat: support CORS by using rest.WithCors(...) ( #1212 )
...
* feat: support CORS by using rest.WithCors(...)
* chore: add comments
* refactor: lowercase unexported methods
* ci: fix lint errors
2021-11-07 22:42:40 +08:00
Kevin Wan
3ede597a15
feat: support customizing timeout for specific route ( #1203 )
...
* feat: support customizing timeout for specific route
* test: add more tests
2021-11-03 22:20:32 +08:00
Kevin Wan
91b10bd3b9
feat: add rest.WithPrefix to support route prefix ( #1194 )
2021-11-01 20:15:10 +08:00
Kevin Wan
7e3fe77e7b
chore: update goctl version to 1.2.3, prepare for release ( #1193 )
...
* feat: slow threshold customizable in rest
* chore: update goctl version to 1.2.3, prepare for release
2021-11-01 18:26:08 +08:00
Kevin Wan
ba43214dae
feat: slow threshold customizable in zrpc ( #1191 )
...
* feat: slow threshold customizable in rest
* feat: slow threshold customizable in rest
* feat: slow threshold customizable in rest
* feat: slow threshold customizable in zrpc
2021-11-01 15:04:38 +08:00
Kevin Wan
769d06c8ab
refactor: simplify tls config in rest ( #1181 )
2021-10-31 14:10:47 +08:00
Howie
cd1f8da13f
[update] add plugin config ( #1180 )
...
Signed-off-by: lihaowei <haoweili35@gmail.com>
2021-10-31 12:56:25 +08:00
Kevin Wan
fc04ad7854
export pathvar for user-defined routers ( #911 )
...
* refactor
* export pathvar for user-defined routers
2021-08-14 22:57:28 +08:00
另维64
7e087de6e6
doc: fix spell mistake ( #627 )
2021-04-14 17:58:27 +08:00
Kevin Wan
fcd15c9b17
refactor, and add comments to describe graceful shutdown ( #564 )
2021-03-14 08:51:10 +08:00
Kevin Wan
655ae8034c
fix golint issues in rest ( #529 )
2021-03-01 19:15:35 +08:00
Kevin Wan
82d1ccf376
fixes #286 ( #315 )
2020-12-25 19:47:27 +08:00
kevin
fe0d0687f5
support cors in rest server
2020-10-21 14:10:36 +08:00
kingxt
aa3c391919
api add middleware support ( #140 )
...
* rebase upstream
* rebase
* trim no need line
* trim no need line
* trim no need line
* update doc
* remove update
* remove no need
* remove no need
* goctl add jwt support
* goctl add jwt support
* goctl add jwt support
* goctl support import
* goctl support import
* support return ()
* revert
* refactor and rename folder to group
* remove no need
* add anonymous annotation
* optimized
* rename
* rename
* update test
* api add middleware support: usage:
@server(
middleware: M1, M2
)
* api add middleware support: usage:
@server(
middleware: M1, M2
)
* simple logic
* should reverse middlewares
* optimized
* optimized
* rename
Co-authored-by: kingxt <dream4kingxt@163.com>
2020-10-19 18:34:10 +08:00
kevin
054d9b5540
rename rest files
2020-08-18 20:20:44 +08:00
kevin
b541403ce2
export router
2020-08-12 12:16:36 +08:00
kevin
0a7e0cce77
update package reference
2020-08-08 16:40:10 +08:00
kevin
b73684d9a6
move router to httpx
2020-07-31 12:13:30 +08:00
kevin
f372ded63c
rename ngin to rest
2020-07-31 11:45:16 +08:00
kevin
0897f60c5d
rename ngin to rest
2020-07-31 11:14:48 +08:00