This commit is contained in:
jackdaw 2016-11-28 15:08:17 +09:00
parent 0105801710
commit a54888b469

View File

@ -5,6 +5,7 @@ import (
"encoding/json" "encoding/json"
"loafle.com/commons/communicate/events" "loafle.com/commons/communicate/events"
"net/http" "net/http"
"strconv"
) )
type communicator struct { type communicator struct {
@ -27,7 +28,7 @@ func (c *communicator) start() {
m := event.Data.(events.URLMaker) m := event.Data.(events.URLMaker)
data, _ := json.Marshal(event) data, _ := json.Marshal(event)
r, _ := http.Post(GetRootURL()+m.GetUrl(), "application/json", bytes.NewBuffer(data)) r, _ := http.Post(GetRootURL()+m.GetUrl(), "application/json", bytes.NewBuffer(data))
e.Result <- events.Result{Message: r.StatusCode} e.Result <- events.Result{Message: strconv.Itoa(r.StatusCode)}
}(e) }(e)
} }
}() }()