From ccb7a89061ea3cef8d0cb623e4a582d5aca3191e Mon Sep 17 00:00:00 2001 From: zryfish Date: Tue, 26 May 2020 15:29:06 +0800 Subject: [PATCH] fix 415 unsupported media type (#2122) --- pkg/apiserver/runtime/runtime.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/apiserver/runtime/runtime.go b/pkg/apiserver/runtime/runtime.go index 7d65b0463..453241eca 100644 --- a/pkg/apiserver/runtime/runtime.go +++ b/pkg/apiserver/runtime/runtime.go @@ -40,7 +40,8 @@ func init() { func NewWebService(gv schema.GroupVersion) *restful.WebService { webservice := restful.WebService{} - webservice.Path(ApiRootPath + "/" + gv.String()) + webservice.Path(ApiRootPath + "/" + gv.String()). + Produces(restful.MIME_JSON) return &webservice }