api: encode body param in endpoint

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-02-02 19:35:16 +03:00
parent a0bbfd6d02
commit 024868bfd7

View File

@ -98,6 +98,7 @@ func Encode(e *Endpoint) map[string]string {
set("method", strings.Join(e.Method, ","))
set("path", strings.Join(e.Path, ","))
set("host", strings.Join(e.Host, ","))
set("body", e.Body)
return ep
}
@ -118,6 +119,7 @@ func Decode(e metadata.Metadata) *Endpoint {
ephost, _ := e.Get("host")
ep.Host = []string{ephost}
ep.Handler, _ = e.Get("handler")
ep.Body, _ = e.Get("body")
return ep
}