# `Statifier.Send.BasicHTTP.Transport.Httpc`
[🔗](https://github.com/riddler/statifier-ex/blob/v2.10.0/lib/statifier/send/basic_http/transport/httpc.ex#L1)

The default `Statifier.Send.BasicHTTP.Transport`, on OTP's `:httpc`
(ADR-0075 decision 6). No dependency: `:inets`, `:ssl` and `:public_key`
ship with OTP.

This package's application list names none of them, so a host that
registers nothing starts nothing. The adapter starts `:inets` and `:ssl`
itself on its first POST, and checks that `:ssl` and `:public_key` can
be loaded; when they cannot, the POST answers `{:error, reason}` and the
processor reports the miss.

For an `https` URL it verifies the peer (`verify: :verify_peer`) against
the system CA store (`:public_key.cacerts_get/0`) and checks the host
name. Each request is bounded by a five-second connect timeout and a
five-second request timeout, so a slow location holds the sending
session no longer than that.

# `post`

```elixir
@spec post(url :: String.t(), headers :: [{String.t(), String.t()}], body :: binary()) ::
  {:ok, 100..599} | {:error, term()}
```

POSTs `body` with `headers` to `url` through `:httpc`, once (see
`c:Statifier.Send.BasicHTTP.Transport.post/3`).

---

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