MikrotikApi.Transport behaviour (mikrotik_api v0.3.4)
View SourceBehaviour for pluggable MikroTik API transports.
The default transport is MikrotikApi.Transport.Httpc. Tests can use
MikrotikApi.Transport.Mock to stub RouterOS REST endpoints without a device.
Custom transports must implement request/5 and return the same shape as
Erlang :httpc responses after normalization:
{:ok, {status, response_headers, response_body}}
{:error, reason}
Summary
Types
@type body() :: iodata() | :undefined
@type method() :: :get | :post | :put | :patch | :delete
@type resp_body() :: binary()
@type status() :: pos_integer()
@type url() :: charlist()