fix clients
This commit is contained in:
parent
8cc5711289
commit
b8105ba4d1
2
http.go
2
http.go
@ -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())
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user