CookieJar

hex.pm versionAPI DocsBuild Status

COOKIE JAR

Installation

The package can be installed by adding cookie_jar to your list of dependencies in mix.exs:

def deps do
  [{:cookie_jar, "~> 1.0"}]
end

Usage

  1. Add alias

    alias CookieJar.HTTPoison, as: HTTPoison
  2. Get a cookie jar

    {:ok, jar} = CookieJar.new
  3. Shove the jar into all http calls

    - HTTPoison.get("https://example.com/api/call")
    + HTTPoison.get(jar, "https://example.com/api/call")
  4. Profit (cookies imprisoned)

Take a look at the docs