fix clients

This commit is contained in:
Asim Aslam 2019-01-10 11:59:45 +00:00 committed by Vasiliy Tolstov
parent 8cc5711289
commit b8105ba4d1
2 changed files with 7 additions and 2 deletions

View File

@ -74,7 +74,7 @@ func (h *httpClient) call(ctx context.Context, address string, req client.Reques
} }
// marshal request // marshal request
b, err := cf.Marshal(req.Request()) b, err := cf.Marshal(req.Body())
if err != nil { if err != nil {
return errors.InternalServerError("go.micro.client", err.Error()) return errors.InternalServerError("go.micro.client", err.Error())
} }

View File

@ -2,6 +2,7 @@ package http
import ( import (
"github.com/micro/go-micro/client" "github.com/micro/go-micro/client"
"github.com/micro/go-micro/codec"
) )
type httpRequest struct { type httpRequest struct {
@ -43,7 +44,11 @@ func (h *httpRequest) Method() string {
return h.method return h.method
} }
func (h *httpRequest) Request() interface{} { func (h *httpRequest) Codec() codec.Writer {
return nil
}
func (h *httpRequest) Body() interface{} {
return h.request return h.request
} }