From 5fddc23005c72bb5145debbd68ce1eac636c2211 Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 12 Apr 2018 16:14:18 +0900 Subject: [PATCH] ing --- servlet/rest-servlet.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/servlet/rest-servlet.go b/servlet/rest-servlet.go index 7a38867..72c332d 100644 --- a/servlet/rest-servlet.go +++ b/servlet/rest-servlet.go @@ -96,7 +96,7 @@ func (s *RESTServlets) HandleGet(servletCtx server.ServletCtx, ctx *fasthttp.Req } func (s *RESTServlets) HandlePost(servletCtx server.ServletCtx, ctx *fasthttp.RequestCtx, mapping *MethodMapping) *csw.Error { - params := make([]string, 0) + params := make([][]byte, 0) if nil != mapping.ParamKeys { buf := ctx.PostBody() if nil == buf || 0 == len(buf) { @@ -113,11 +113,11 @@ func (s *RESTServlets) HandlePost(servletCtx server.ServletCtx, ctx *fasthttp.Re if !ok { return csw.NewError(fasthttp.StatusBadRequest, fmt.Errorf("Parameter for %s is not valied", k)) } - params = append(params, string(v)) + params = append(params, v) } } - _, err := s.restRegistry.Invoke(mapping.Method, params, servletCtx, ctx) + _, err := s.restRegistry.InvokeWithBytes(mapping.Method, params, servletCtx, ctx) if nil != err { return csw.NewError(fasthttp.StatusInternalServerError, err)