title: Use HTTPoison to initialize a module attribute
body: <p>I am trying to do initialize a module attribute like this</p>
  
  <pre><code>  response = HTTPoison.get! url
    {:ok, response} = Poison.decode(response.body)
    @attr response
  </code></pre>
  
  <p>I have done it before with a file, something like this:</p>
  
  <pre><code>  @external_resource file = Path.join([__DIR__, "file.txt"])
    Module.register_attribute __MODULE__, :attr, accumulate: true
  
    for line &lt;- File.stream!(file, [], :line) do
      @attr line
      ...
  </code></pre>
  
  <p>Is not possible to do the same with HTTPoison and fetching the response of an API?
  I am receiving this error:</p>
  
  <pre><code>== Compilation error in file lib/module.ex ==
  ** (ArgumentError) argument error
      (stdlib) :ets.lookup_element(:hackney_config, :mod_metrics, 2)
      /project/deps/hackney/src/hackney_metrics.erl:27: :hackney_metrics.get_engine/0
      /project/deps/hackney/src/hackney_connect.erl:69: :hackney_connect.create_connection/5
      /project/deps/hackney/src/hackney_connect.erl:37: :hackney_connect.connect/5
      /project/deps/hackney/src/hackney.erl:316: :hackney.request/5
      lib/httpoison/base.ex:630: HTTPoison.Base.request/9
      lib/httpoison.ex:66: HTTPoison.request!/5
      lib/module.ex:4: (module)
  </code></pre>