Simply wanting to try an HTTP get with HTTPoison.
mix.exs
defmodule HttpoisonTest.Mixfile do
use Mix.Project
def project do
[app: :httpoison_test,
version: "0.1.0",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
# Configuration for the OTP application
#
# Type "mix help compile.app" for more information
def application do
# Specify extra applications you'll use from Erlang/Elixir
[extra_applications: [:logger]]
end
# Dependencies can be Hex packages:
#
# {:my_dep, "~> 0.3.0"}
#
# Or git/path repositories:
#
# {:my_dep, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
#
# Type "mix help deps" for more examples and options
defp deps do
[
{:httpoison, "~> 0.11.0"}
]
end
end
Getting deps
% mix deps.get
Running dependency resolution...
Dependency resolution completed:
certifi 0.7.0
hackney 1.6.5
httpoison 0.11.0
idna 1.2.0
metrics 1.0.1
mimerl 1.0.2
ssl_verify_fun 1.1.1
* Getting httpoison (Hex package)
Checking package (https://repo.hex.pm/tarballs/httpoison-0.11.0.tar)
Fetched package
* Getting hackney (Hex package)
Checking package (https://repo.hex.pm/tarballs/hackney-1.6.5.tar)
Fetched package
* Getting certifi (Hex package)
Checking package (https://repo.hex.pm/tarballs/certifi-0.7.0.tar)
Fetched package
* Getting idna (Hex package)
Checking package (https://repo.hex.pm/tarballs/idna-1.2.0.tar)
Fetched package
* Getting metrics (Hex package)
Checking package (https://repo.hex.pm/tarballs/metrics-1.0.1.tar)
Fetched package
* Getting mimerl (Hex package)
Checking package (https://repo.hex.pm/tarballs/mimerl-1.0.2.tar)
Fetched package
* Getting ssl_verify_fun (Hex package)
Checking package (https://repo.hex.pm/tarballs/ssl_verify_fun-1.1.1.tar)
Fetched package
Attempting to drop into iex w/ mix
iex -S mix
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
===> Compiling idna
===> Compiling mimerl
===> Compiling metrics
==> ssl_verify_fun (compile)
Compiled src/ssl_verify_util.erl
Compiled src/ssl_verify_fingerprint.erl
Compiled src/ssl_verify_pk.erl
Compiled src/ssl_verify_hostname.erl
===> Compiling certifi
===> Package certifi-0.7.0 not found. Fetching registry updates and trying again...
===> Updating package registry...
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
** (Mix) Could not compile dependency :hackney, "/Users/???/.mix/rebar3 bare compile --paths "/Users/???/code/elixir/httpoison_test/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile hackney", update it with "mix deps.update hackney" or clean it with "mix deps.clean hackney"