func (c *client) unmarshaler(rsp mercury.Response, protocol interface{}) tmsg.Unmarshaler { result := marshaling.Unmarshaler(rsp.Headers()[marshaling.ContentTypeHeader], protocol) if result == nil { // Default to proto result = marshaling.Unmarshaler(marshaling.ProtoContentType, protocol) } return result }
func (e Endpoint) unmarshaler(req mercury.Request) tmsg.Unmarshaler { result := marshaling.Unmarshaler(req.Headers()[marshaling.ContentTypeHeader], e.Request) if result == nil { // Default to json result = marshaling.Unmarshaler(marshaling.JSONContentType, e.Request) } return result }
func (e Endpoint) unmarshaler(req mercury.Request) tmsg.Unmarshaler { return marshaling.Unmarshaler(req.Headers()[marshaling.ContentTypeHeader], e.Request) }