// Post posts the given WebhookMessage to the given webhook URL.
Post posts the given WebhookMessage to the given webhook URL.
// Post posts the given WebhookMessage to the given webhook URL .
func Post(url string, msg WebhookMessage) error {
	slackMessageJSON, err := json.Marshal(msg)
	if err != nil {
		return err
	}
	resp, err := http.Post(url, "text/json", strings.NewReader(string(slackMessageJSON)))
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	return nil
}
func Post ( url string , msg WebhookMessage ) error { slackMessageJSON , err := json . Marshal ( msg ) if err != nil { return err } resp , err := http . Post ( url , " " , strings . NewReader ( string ( slackMessageJSON ) ) ) if err != nil { return err } defer resp . Body . Close ( ) return nil }
Post posts the given WebhookMessage to the given webhook URL.
Post posts the given WebhookMessage to the given webhook URL .