support request content type and call address

This commit is contained in:
Asim Aslam
2018-04-17 12:12:51 +01:00
committed by Vasiliy Tolstov
parent 3d3d9bb1e7
commit 7e872d1275
3 changed files with 31 additions and 10 deletions

31
message.go Normal file
View File

@@ -0,0 +1,31 @@
package http
import (
"github.com/micro/go-micro/client"
)
type httpMessage struct {
topic string
contentType string
payload interface{}
}
func newHTTPMessage(topic string, payload interface{}, contentType string) client.Message {
return &httpMessage{
payload: payload,
topic: topic,
contentType: contentType,
}
}
func (h *httpMessage) ContentType() string {
return h.contentType
}
func (h *httpMessage) Topic() string {
return h.topic
}
func (h *httpMessage) Payload() interface{} {
return h.payload
}