This commit is contained in:
crusader 2018-04-12 16:56:06 +09:00
parent e542a7a5f9
commit 1697f371c2

View File

@ -6,7 +6,6 @@ import (
"strconv"
cuej "git.loafle.net/commons/util-go/encoding/json"
cur "git.loafle.net/commons/util-go/reflect"
cus "git.loafle.net/commons/util-go/service"
)
@ -102,7 +101,7 @@ func (rr *restRegistry) InvokeWithBytes(method string, params [][]byte, leadingP
}
// Decode the args.
pValues, pInstances := methodSpec.ParamValues()
_, pInstances := methodSpec.ParamValues()
lParamLen := 0
if nil != leadingParams {
@ -117,14 +116,10 @@ func (rr *restRegistry) InvokeWithBytes(method string, params [][]byte, leadingP
}
for indexC := 0; indexC < len(params); indexC++ {
t, _, _ := cur.GetTypeInfo(pValues[indexC+lParamLen].Type())
if t.Kind() != reflect.String {
_params = append(_params, string(params[indexC]))
continue
}
ts, err := strconv.Unquote(string(params[indexC]))
if nil != err {
return nil, err
_params = append(_params, string(params[indexC]))
continue
}
_params = append(_params, ts)
}