Tesla.Builder.plug
You're seeing just the macro
plug
, go back to Tesla.Builder module for more information.
Attach middleware to your API client.
defmodule ExampleApi do
use Tesla
# plug middleware module with options
plug Tesla.Middleware.BaseUrl, "http://api.example.com"
# or without options
plug Tesla.Middleware.JSON
# or a custom middleware
plug MyProject.CustomMiddleware
end