Skip to content

Commit

Permalink
Include the decoded body
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Jun 7, 2019
1 parent bfdec9e commit f5ac238
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/rpc_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type rpcRequest struct {
codec codec.Codec
header map[string]string
body []byte
rawBody interface{}
stream bool
}

Expand Down Expand Up @@ -48,8 +49,7 @@ func (r *rpcRequest) Header() map[string]string {
}

func (r *rpcRequest) Body() interface{} {
// TODO: convert to interface value
return r.body
return r.rawBody
}

func (r *rpcRequest) Read() ([]byte, error) {
Expand Down
1 change: 1 addition & 0 deletions server/rpc_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func (s *service) call(ctx context.Context, router *router, sending *sync.Mutex,
method: req.msg.Method,
endpoint: req.msg.Endpoint,
body: req.msg.Body,
rawBody: argv.Interface(),
}

if !mtype.stream {
Expand Down

0 comments on commit f5ac238

Please sign in to comment.