# Membrane Multimedia Framework: Hackney Element

[![Build Status](](

This package provides elements that can be used to read files over HTTP using
[Hackney]( library.

It is part of [Membrane Multimedia Framework](

## Installation

Add the following line to your `deps` in `mix.exs`.  Run `mix deps.get`.

{:membrane_element_hackney, "~> 0.1"}

## Sample usage

This should get you a kitten from imgur and save as `kitty.jpg`.

defmodule Hackney.Pipeline do
  use Membrane.Pipeline
  alias Pipeline.Spec
  alias Membrane.Element.File
  alias Membrane.Element.Hackney

  @impl true
  def handle_init(_) do
    children = [
      hackney_src: %Hackney.Source{location: ""},
      file_sink: %File.Sink{location: "kitty.jpg"},
    links = %{
      {:hackney_src, :source} => {:file_sink, :sink}

    {{:ok, %Spec{children: children, links: links}}, %{}}

## Copyright and License

Copyright 2018, [Software Mansion](

[![Software Mansion](](