# `Skir.RPC.Plug`
[🔗](https://github.com/gepheum/skir/blob/main/lib/skir/rpc/plug.ex#L1)

Plug/Phoenix adapter for `Skir.RPC.Service` with no hard dependency on Plug.

Use it from Phoenix with `forward "/rpc", Skir.RPC.Plug, service: &MyApp.RPC.service/0`.
Plug must be present in the host application.

# `call`

```elixir
@spec call(term(), keyword()) :: term()
```

Handles GET and POST requests using the configured service. POST bodies are bounded before parsing.

# `init`

```elixir
@spec init(keyword()) :: keyword()
```

Accepts the adapter options. The `:service` option is required; `:metadata` may be an arity-1 function.

---

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