webdavex v0.3.2 Webdavex View Source
WebDAV client for elixir applications. See Webdavex.Client
.
Refer to Webdavex.Config
for detailed information on available options.
Examples
General usage
defmodule MyClient
use Webdavex, base_url: "https://webdav.com/my_app"
end
MyClient.get("images/foobar.png")
{:ok, ...}
Dynamic config
In order to change configuration during runtime you can wrap a client in Agent
and override config/0
to fetch data from its state.
defmodule MyClient do
use Webdavex.Agent, base_url: "https://webdav.com"
end
{:ok, _pid} = MyClient.start_link()
MyClient.update_config(%{base_url: "http://host", headers: [{"Foo", "bar}]})
MyClient.get("images/foobar.png")
{:ok, ...}