diff --git a/transport/http/codec.go b/transport/http/codec.go index d3fbc1a..156448a 100644 --- a/transport/http/codec.go +++ b/transport/http/codec.go @@ -37,8 +37,8 @@ func DefaultRequestQuery(r *http.Request, v any) error { return binding.BindQuery(r.URL.Query(), v) } func DefaultRequestDecoder(r *http.Request, v any) error { + fmt.Println("request decoder") codec, ok := CodeForRequest(r, "Content-type") - fmt.Println(codec, ok) if !ok { return errors.BadRequest("CODEC", fmt.Sprintf("unregister Content-Type: %s", codec)) } @@ -56,6 +56,7 @@ func DefaultRequestDecoder(r *http.Request, v any) error { return nil } func DefaultResponseEncoder(w http.ResponseWriter, r *http.Request, v any) error { + fmt.Println("response encode") if v == nil { return nil }