NatureWhistle.Notifier.Webhook (nature_whistle v0.3.0)

Copy Markdown

Generic HTTP webhook delivery backend.

This notifier sends the formatted message to any HTTP endpoint using Req. It is the most flexible of the built-in delivery modules because it allows the HTTP method, headers, and JSON payload shape to be customized.

Required config:

  • :webhook_url - the destination URL

Optional config:

  • :method - HTTP verb, defaults to :post
  • :headers - a list of request headers
  • :payload - a base JSON map merged with %{text: message}

Retry behavior is shared with Slack and Teams through NatureWhistle.Notifier.Retry.

Summary

Functions

Delivers a message to an arbitrary webhook endpoint.

Functions

deliver(message, metadata, config)

Delivers a message to an arbitrary webhook endpoint.

The notifier accepts either a keyword list or a map. The final JSON payload is built by merging the configured :payload map with %{text: message}.