ing
This commit is contained in:
parent
87b2609eb0
commit
5fddc23005
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user