You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was struggling with Echo lately to be able to Bind a single request's body multiple times. But because of JSON decode this is not possible. I managed to solve my problem with writing a new Binder that is 90% equal to the DefaultBinder. I was wondering can we actually incorporate such feature inside Echo to avoid writing very similar code to address this matter?
To address this I was thinking about having an BindConfig struct inside DefaultBinder that has a boolean flag to enable or disable shadow read. So by enabling that we cache the decoded body inside context as a map and do the binding on that if it is present. This can not affect DefaultBinder's Bind function very much and the code change on it would be not much. But many guys like me would not be forced to write new Binder very similar to DefaultBinder.
I wanted to report this to see if this is possible or not. If it is possible i would be happy to contribute
The text was updated successfully, but these errors were encountered:
samanebi
changed the title
Feature Request: Shadow read
Feature Request: Bind request's body multiple times
Jun 6, 2024
I was struggling with Echo lately to be able to Bind a single request's body multiple times. But because of JSON decode this is not possible. I managed to solve my problem with writing a new Binder that is 90% equal to the DefaultBinder. I was wondering can we actually incorporate such feature inside Echo to avoid writing very similar code to address this matter?
To address this I was thinking about having an BindConfig struct inside DefaultBinder that has a boolean flag to enable or disable shadow read. So by enabling that we cache the decoded body inside context as a map and do the binding on that if it is present. This can not affect DefaultBinder's Bind function very much and the code change on it would be not much. But many guys like me would not be forced to write new Binder very similar to DefaultBinder.
I wanted to report this to see if this is possible or not. If it is possible i would be happy to contribute
The text was updated successfully, but these errors were encountered: