# `SmolBox.Transport`
[🔗](https://github.com/hfiguera/smolbox/blob/v0.1.2/lib/smolbox/transport.ex#L1)

Host-selected transport extension point. No callback may retry mutations.

Implementations must validate HTTP status and media type, cap bodies before
decoding, and redact failures. A returned error after possible dispatch cannot
authorize replay. The default Req implementation is exercised against actual
HTTP peers; replacing it transfers those obligations to the host adapter.

# `request`

```elixir
@type request() :: %{
  method: :get | :post | :put | :delete,
  path: String.t(),
  body: binary(),
  content_type: String.t(),
  accept: String.t(),
  max_bytes: pos_integer(),
  mode:
    :buffer
    | :empty
    | {:sse, pos_integer(), (SmolBox.Wire.SSE.event() -&gt; any()) | nil}
}
```

# `request`

```elixir
@callback request(SmolBox.Worker.t(), request()) ::
  {:ok, binary() | SmolBox.Result.t()} | {:error, SmolBox.Error.t()}
```

---

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