# `WardrikSlack.HTTP`

Takes what Slack sends over HTTP.

| Path      | Slack setting                        |
| --------- | ------------------------------------ |
| `events`  | **Event Subscriptions** Request URL  |
| `actions` | **Interactivity** Request URL        |

Each request must be signed with the channel's `:signing_secret` and be under five minutes
old. Otherwise it gets `401`. Without `:signing_secret`, every request gets `404`.

Slack's `url_verification` check is answered with its challenge. Everything else is handled in
a task. Slack gets `200` once the task is done, or after two seconds, whichever comes first.
Slack resends what isn't answered within three seconds. A resent message is asked only once.

# `request`

```elixir
@spec request(WardrikChannel.Channel.t(), Wardrik.Channel.request()) ::
  Wardrik.Channel.response()
```

Answers a `request` Slack sent the channel.

# `signature`

```elixir
@spec signature(String.t(), integer(), String.t()) :: String.t()
```

Returns the `x-slack-signature` Slack sends with `body`, signed with `secret` at Unix time `at`.

---

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