李伟乐 2 years ago
parent d85cc06557
commit a6b5431106
  1. 2
      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("request decoder", ok)
if !ok {
return errors.BadRequest("CODEC", fmt.Sprintf("unregister Content-Type: %s", codec))
}

Loading…
Cancel
Save