From b8105ba4d15c83ecd888173f177ff2ac665c0162 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 10 Jan 2019 11:59:45 +0000 Subject: [PATCH] fix clients --- http.go | 2 +- request.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/http.go b/http.go index 1194d5c..d65ac56 100644 --- a/http.go +++ b/http.go @@ -74,7 +74,7 @@ func (h *httpClient) call(ctx context.Context, address string, req client.Reques } // marshal request - b, err := cf.Marshal(req.Request()) + b, err := cf.Marshal(req.Body()) if err != nil { return errors.InternalServerError("go.micro.client", err.Error()) } diff --git a/request.go b/request.go index 740bbcf..6618636 100644 --- a/request.go +++ b/request.go @@ -2,6 +2,7 @@ package http import ( "github.com/micro/go-micro/client" + "github.com/micro/go-micro/codec" ) type httpRequest struct { @@ -43,7 +44,11 @@ func (h *httpRequest) Method() string { return h.method } -func (h *httpRequest) Request() interface{} { +func (h *httpRequest) Codec() codec.Writer { + return nil +} + +func (h *httpRequest) Body() interface{} { return h.request }