# `Ussd.Response`
[🔗](https://github.com/spesohq/ussd/blob/main/lib/ussd/response.ex#L1)

Shapes the engine's result into whatever your gateway expects. Wired in via
`Ussd.use_response/2`, either as a module implementing this behaviour or as a
3-arity function `(context, message, terminating? -> term)`.

The context is passed explicitly (unlike Laravel's `Response`, which pulls it from
the service container) so a formatter's dependencies are visible in its signature.

Ships six ready-made formatters under `Ussd.Responses.*` for Africa's Talking,
Speso, Nalo, Nsano, Moolre and Arkesel.

# `respond`

```elixir
@callback respond(Ussd.Context.t(), message :: String.t(), terminating? :: boolean()) ::
  term()
```

Formats the resolved `message` and `terminating?` flag into the shape your gateway expects.

---

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