Use client.Call for non streaming requests

This commit is contained in:
Asim Aslam
2019-08-16 17:24:17 +01:00
parent 0b0eee41d0
commit 4495ca3839
4 changed files with 23 additions and 22 deletions

View File

@@ -249,6 +249,12 @@ func (c *rpcCodec) ReadHeader(m *codec.Message, r codec.MessageType) error {
func (c *rpcCodec) ReadBody(b interface{}) error {
// read body
// read raw data
if v, ok := b.(*raw.Frame); ok {
v.Data = c.buf.rbuf.Bytes()
return nil
}
if err := c.codec.ReadBody(b); err != nil {
return errors.InternalServerError("go.micro.client.codec", err.Error())
}