From 170c4da08f30a2d0318c75dd9a2a8c4d3f1e6626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F=E4=B9=90?= Date: Tue, 14 Mar 2023 14:22:35 +0800 Subject: [PATCH] x --- transport/http/codec.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }