In a module I am calling HTTPoison.start()
(related question Use HTTPoison to initialize a module attribute)
But I would like to configure it in mix.ex
, I have read the mix ex documentation and added it to extra_applications: [:httpoison]
but didnt work, also tried with applications
and included_applications
, what am I doing wrong?
Edit.
defmodule TestDep.MixProject do
use Mix.Project
def project do
[
app: :testdep,
version: "0.1.0",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:httpoison, "~> 1.0"}
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"},
]
end
end
defmodule TestDep do
@moduledoc """
Documentation for TestDep.
"""
#HTTPoison.start()
HTTPoison.get! "www.google.es"
end