Slide 35
Slide 35 text
Fuller, Inc. All Rights Reserved
Gaoling Code Example 35
import (
“http”,
“github.com/fuller-inc/nwatch”,
)
func main() {
data := &nwatch.HookData{
URL: “https://google.com/”,
Status: “succeed”,
}
if err := WebHook(); err != nil {
panic(err)
}
}
func WebHook(data *nwatch.HookData) error {
_, err := http.Post(“http://joren.internal:8051/v1/hooks/data”, “application/json”, data)
return err
}