Commit Graph

43 Commits

Author SHA1 Message Date
Kevin Wan
b206dd28a3
feat: support form values in gateway (#2158) 2022-07-16 23:40:53 +08:00
Kevin Wan
ed1c937998
feat: convert grpc errors to http status codes (#1997)
* feat: convert grpc errors to http status codes

* chore: circuit break include unimplemented grpc error

* chore: add reference link in comments
2022-06-11 23:07:26 +08:00
Kevin Wan
f21970c117
test: add more tests (#1856) 2022-05-02 21:24:20 +08:00
Kevin Wan
3bbc90ec24
refactor: move json related header vars to internal (#1840)
* refactor: move json related header vars to internal

* refactor: use header.ContentType
2022-04-28 15:12:04 +08:00
Kevin Wan
cef83efd4e
fix #1838 (#1839) 2022-04-28 11:25:26 +08:00
Vee Zhang
94ddb3380e
fix: rest: WriteJson get 200 when Marshal failed. (#1803)
Only the first WriteHeader call takes effect.
2022-04-21 21:55:01 +08:00
Kevin Wan
c1d9e6a00b
feat: add httpc.Parse (#1698) 2022-03-23 17:58:21 +08:00
Kevin Wan
a91c3907a8
feat: rename module from tal-tech to zeromicro (#1413) 2022-01-04 15:51:32 +08:00
Kevin Wan
62266d8f91
fix #1070 (#1389)
* fix #1070

* test: add more tests
2021-12-29 21:34:28 +08:00
Kevin Wan
cd289465fd
chore: coding style and comments (#1361)
* chore: coding style and comments

* chore: optimize `ParseJsonBody` (#1353)

* chore: optimize `ParseJsonBody`

* chore: optimize `ParseJsonBody`

* fix: fix a test

* chore: optimize `ParseJsonBody`

* fix a test

* chore: add comment

* chore: refactor

Co-authored-by: chenquan <chenquan.dev@foxmail.com>
2021-12-22 21:43:37 +08:00
chenquan
263e426ae1
chore: optimize ParseJsonBody (#1353)
* chore: optimize `ParseJsonBody`

* chore: optimize `ParseJsonBody`

* fix: fix a test

* chore: optimize `ParseJsonBody`

* fix a test

* chore: add comment
2021-12-22 20:24:55 +08:00
Kevin Wan
9d0b51fa26
fixes #1222 (#1223) 2021-11-10 21:25:51 +08:00
Kevin Wan
496a2f341e
test: add more tests (#1163)
* chore: reverse the order of stopping services

* chore: reverse the order of stopping services

* test: add more tests
2021-10-25 21:10:08 +08:00
Kevin Wan
5636bf4955
test: add more tests (#1150) 2021-10-20 17:50:01 +08:00
Kevin Wan
407a6cbf9c
format coding style (#983) 2021-09-01 19:52:56 +08:00
Vee Zhang
76fc1ef460
httpx.Error response without body (#982)
* httpx.Error support response without body

* fix doc
2021-09-01 19:33:33 +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
Kevin Wan
54d57c7d4b
refactor rest code (#895) 2021-08-10 17:59:33 +08:00
voidint
28a7c9d38f
fix http header binding failure bug #885 (#887) 2021-08-10 17:38:03 +08:00
Chen Quan
22a1315136
[WIP]Add parse headers info (#805)
* Add parse headers info

* Update parse headers info
2021-07-07 23:20:09 +08:00
Bo-Yi Wu
73906f996d
chore(format): change by gofumpt tool (#697)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-05-18 14:43:09 +08:00
Kevin Wan
655ae8034c
fix golint issues in rest (#529) 2021-03-01 19:15:35 +08:00
Kevin Wan
ad32f9de23
fix golint issues in core/threading (#524) 2021-02-26 16:27:04 +08:00
hao
2087ac1e89
修正http转发头字段值错误 (#521) 2021-02-26 16:17:30 +08:00
Kevin Wan
5e969cbef0
fix golint issues, else blocks (#457) 2021-02-09 13:50:21 +08:00
bittoy
88ec89bdbd
optimization (#241) 2020-12-02 15:00:07 +08:00
kevin
9592639cb4 add error handle tests 2020-11-17 18:04:48 +08:00
kevin
abcb28e506 support error customization 2020-11-17 17:11:06 +08:00
kevin
668a7011c4 add more tests 2020-10-31 20:11:12 +08:00
kevin
fe0d0687f5 support cors in rest server 2020-10-21 14:10:36 +08:00
kevin
b8fcdd5460 add more tests 2020-10-01 17:50:53 +08:00
kevin
be9c48da7f add tracing logs in server side and client side 2020-09-22 17:34:39 +08:00
kevin
2b1466e41e add more tests 2020-08-21 23:09:35 +08:00
kevin
d6c7da521e remove bodyless check 2020-08-12 14:44:09 +08:00
kevin
96b6d2ab58 parse body only if content length > 0 2020-08-12 14:37:34 +08:00
kevin
88a73f1042 return ErrBodylessRequest on get method etc. 2020-08-12 14:31:11 +08:00
kevin
80d55dbc02 export httpx.GetRemoteAddr 2020-08-12 12:25:52 +08:00
kevin
c57051ce63 use strings.Contains instead of strings.Index 2020-08-11 17:18:51 +08:00
kevin
0a7e0cce77 update package reference 2020-08-08 16:40:10 +08:00
kim
44290aa4d6 refactor 2020-07-31 17:11:59 +08:00
kim
cf8e0a118f refactor ngin to rest 2020-07-31 17:03:19 +08:00
kevin
b73684d9a6 move router to httpx 2020-07-31 12:13:30 +08:00
kevin
0897f60c5d rename ngin to rest 2020-07-31 11:14:48 +08:00