Replies: 2 comments
-
Why do you want Decode to have access to the ResponseWriter? It's only responsibility is to decode the request. |
Beta Was this translation helpful? Give feedback.
0 replies
-
u can add a middleware after the biz-logic fn |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, by convertion of the package, Decode only has context and http.Request. So, how can we get ResponseWriter from endpoint or Decode so we can decode the body and do some validation.
Were looking for something like:
func Decode(cxt context.Context, w http.ResponseWriter, r *http.Request) (interface{}, error) {}
Beta Was this translation helpful? Give feedback.
All reactions