1
0
mirror of https://github.com/labstack/echo.git synced 2025-04-23 12:18:53 +02:00

26 Commits

Author SHA1 Message Date
Vishal Rana
9bf857f14c Nil check for bind
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-07-14 22:39:07 -07:00
Vishal Rana
da45981491 Fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-07-14 21:35:59 -07:00
Vishal Rana
8fb7b5be27 Closes
Signed-off-by: Vishal Rana <vr@labstack.com>
2019-06-27 10:52:17 -07:00
kolaente
858270f6f5 Added feature to map url params to a struct with the default binder ()
* Added feature to map url params to a struct with the default binder

* Added test for mix of POST data and bound params

* Renamed variables

* Added error check

* Removed unneded fix
2019-06-21 06:12:55 -07:00
Garrett D'Amore
c824b8ddc3 Add support for encoding.TextUnmarshaler in bind. () 2019-06-09 09:39:54 -07:00
Evgeniy Kulikov
282a44d4ad Remove unreachable code ()
`if` <-> `else if` <-> `else` has `return` and after `else` was `return`
2019-01-28 07:59:36 -08:00
Emir Ribić
c8fd197fa8 Replace http constants with stdlib ones, i.e.: http.MethodGet instead of echo.GET () 2018-10-14 20:46:58 +05:30
Thuc Le
f7470482fe Support internal error when Bind() data () 2018-09-28 10:41:13 -07:00
Emir Ribić
688ab2bec6 Remove unecessery if-s and else-s () 2018-09-07 07:58:04 -07:00
Brandon Hansen
6007218835 case sensitive matching prioritized 2018-07-03 13:04:50 -07:00
Brandon Hansen
01cfe83efe Enable case insensitive query param matching
Unmarshalling body params with json.Unmarshal supports case-insensitive
matching against struct tags.  Matching query params case insensitive
provides a more sane and consistent experience for API consumers.

The original url.Values keys remain case sensitive.
2018-07-03 13:04:50 -07:00
AnuchitO
d36ff72961 Add field name in Error message when Binding type mismatch
Old error message
`
Unmarshal type error: expected=int, got=string, offset=47
`
New error message
`
Unmarshal type error: expected=int, got=string, field=age, offset=47
`
Make it easy to fix for client.
2018-05-01 06:51:22 -07:00
Evgeniy Kulikov
f49d166e6f [FIX] Cleanup code ()
Code cleanup
2018-02-21 10:44:17 -08:00
Vishal Rana
70c18060bd Fixed , Closed
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-08-14 21:48:19 -07:00
Vishal Rana
2b6ea65ccd Removed duplicated code in binder
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-08-03 07:52:47 -07:00
Vishal Rana
b42edd791f Closes
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-08-02 23:16:11 -07:00
Guilherme Oenning
f8c3008787 Request: New bind property for route parameters ()
* bind route params

* rename to bindPathData
2017-07-25 07:22:19 -07:00
Christopher Probst
f3f3e99ba3 Add pointer binding of proper types to DefaultBinder () 2017-04-28 11:07:20 -07:00
Vishal Rana
a216a9319a Bind DELETE params too
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-03-31 21:39:18 -07:00
Vishal Rana
42e83ed0b9 Handle GET request with body
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-03-11 22:42:24 -08:00
Vishal Rana
b218599906 Fixed ()
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-02-28 12:04:29 -08:00
Jonathan Hall
ed7353cf60 Fix binding of untagged struct fields ()
* Add failing test

A BindUnmarshaler struct with no tag is not decoded properly.

* Fix binding of untagged structs
2017-01-15 23:13:46 -08:00
Vishal Rana
412823eabb Added key auth middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
2017-01-02 20:12:06 -08:00
Jonathan Hall
9cdc439f34 Support BindUnmarshaler for basic types ()
* Add a failing test for 

* Change ordering of unmarshaler, to handle BindUnmarshalers first

* Add test for arrays of BindUnmarshalers
2016-12-23 10:01:42 -08:00
Vishal Rana
d9a6052c67 Closes , Closes , Updated docs
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-20 23:13:46 -08:00
Vishal Rana
c848119eef fixed
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-12-15 11:08:56 -08:00