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