# `Wardrik.Notify.Webhook`

Posts notices as JSON to a URL.

    audit: {Wardrik.Notify.Webhook, url: "https://hooks.example.com/wardrik", secret: secret}

The body is `Wardrik.Notice.json/1`. The `x-wardrik-event` header names the event. Any status
other than 2xx is a failure.

## Options

  * `:url` - required. Where to post.
  * `:secret` - signs the body. The `x-wardrik-signature` header is then `sha256=` followed by
    the hex HMAC-SHA256 of the body. See `sign/2`.
  * `:req_options` - merged into the `Req` request.

# `sign`

```elixir
@spec sign(String.t(), iodata()) :: String.t()
```

Returns the `x-wardrik-signature` value for `body` signed with `secret`.

    Wardrik.Notify.Webhook.sign(secret, body)
    #=> "sha256=9f86d0..."

---

*Consult [api-reference.md](api-reference.md) for complete listing*
