webdavex v0.3.1 Webdavex.Config View Source
Webdavex.Client
configuration.
Options
:base_url, required.
Schema, host, port and root path of webdav endpoint. Example: “https://myhost.com:8081/something/webdav”.
:headers, default: [].
A list of HTTTP headers that will be added to each of Webdavex.Client
request.
Example: [{“X-Webdav-Client”, “webdavex”}].
HTTP basic auth could be implemented using :headers
options:
username = "client"
password = "supersecret"
digest = :base64.encode(username <> ":" <> password)
headers = [{"Authorization", "Basic " <> digest}]
:hackney_options, default: [].
Options are limited to [:pool, :ssl_options, :connect_options, :proxy, :insecure, :connect_timeout, :recv_timeout], refer to :hackney.request/5
docs for detailed information.
Examples
iex> Webdavex.Config.new(base_url: "http://myhost.com")
%Webdavex.Config{
base_url: URI.parse("http://myhost.com"),
hackney_options: [],
headers: []
}
iex> Webdavex.Config.new(
...> base_url: "http://myhost.com",
...> headers: [{"X-Something", "value"}],
...> hackney_options: [pool: :webdav, foo: 1]
...> )
%Webdavex.Config{
base_url: URI.parse("http://myhost.com"),
headers: [{"X-Something", "value"}],
hackney_options: [pool: :webdav]
}
Link to this section Summary
Functions
Converts enumerable into Webdavex.Config
struct
Link to this section Types
Link to this section Functions
Converts enumerable into Webdavex.Config
struct.