Skip to content

slavone/catalyst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catalyst

Very basic WebDav client for Elixir. Uses :hackney as http driver

Usage

# Start a genserver process

Catalyst.start_link host: "http://example-webdav.com", user: "some_user", password: "123"

# or, in your OTP app add Catalyst as a worker

  def start(_type, _args) do
    import Supervisor.Spec

    webdav_conf = [host: "http://example-webdav.com", user: "some_user", password: "123"]
    # or you can supply just [host: "some_host", digest: "sadsadasd="]
    # explicitly supplied digest will override digest hashed from user:password
    # currently supports only Basic HTTP authentication
    children = [
      worker(Catalyst, [webdav_conf])
    ]

    Supervisor.start_link(children, strategy: :one_for_one)
  end

Authentication params will be stored inside genserver process, and you a good to go.

checkout the Docs

Installation

If available in Hex, the package can be installed by adding catalyst to your list of dependencies in mix.exs:

def deps do
  [{:catalyst, "~> 0.2.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/catalyst.