Include the decoded body
This commit is contained in:
parent
bfdec9e2e3
commit
f5ac238231
@ -14,6 +14,7 @@ type rpcRequest struct {
|
|||||||
codec codec.Codec
|
codec codec.Codec
|
||||||
header map[string]string
|
header map[string]string
|
||||||
body []byte
|
body []byte
|
||||||
|
rawBody interface{}
|
||||||
stream bool
|
stream bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,8 +49,7 @@ func (r *rpcRequest) Header() map[string]string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *rpcRequest) Body() interface{} {
|
func (r *rpcRequest) Body() interface{} {
|
||||||
// TODO: convert to interface value
|
return r.rawBody
|
||||||
return r.body
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *rpcRequest) Read() ([]byte, error) {
|
func (r *rpcRequest) Read() ([]byte, error) {
|
||||||
|
@ -188,6 +188,7 @@ func (s *service) call(ctx context.Context, router *router, sending *sync.Mutex,
|
|||||||
method: req.msg.Method,
|
method: req.msg.Method,
|
||||||
endpoint: req.msg.Endpoint,
|
endpoint: req.msg.Endpoint,
|
||||||
body: req.msg.Body,
|
body: req.msg.Body,
|
||||||
|
rawBody: argv.Interface(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if !mtype.stream {
|
if !mtype.stream {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user