diff --git a/.gitignore b/.gitignore index 9607671..4f84031 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ /_build +/cover /deps +/doc erl_crash.dump *.ez +.mix_tasks diff --git a/lib/forcex.ex b/lib/forcex.ex index c695824..d04b60a 100644 --- a/lib/forcex.ex +++ b/lib/forcex.ex @@ -7,7 +7,6 @@ defmodule Forcex do ### def start(initial_state \\ %{}) do - HTTPoison.start GenServer.start __MODULE__, initial_state end @@ -271,7 +270,7 @@ defmodule Forcex do defp authenticated_get(url = <<"http"::utf8, _::binary>>, {token, token_type}) do url - |> HTTPoison.get!(%{"Authorization" => (token_type <> " " <> token)}) + |> HTTPoison.get!([{"Authorization", (token_type <> " " <> token)}]) |> parse_payload end defp authenticated_get(object, params, state = %{instance_url: url, access_token: token, token_type: token_type}) do @@ -283,7 +282,7 @@ defmodule Forcex do |> authenticated_get({token, token_type}) end - defp parse_payload(%{body: body, headers: %{"Content-Type" => <<"application/json"::utf8, _::binary>>}}) do + defp parse_payload(%{body: body, headers: _headers}) do body |> JSX.decode! end diff --git a/mix.exs b/mix.exs index 64a3ed1..27cb72d 100644 --- a/mix.exs +++ b/mix.exs @@ -8,7 +8,7 @@ defmodule Forcex.Mixfile do def project do [ app: :forcex, - version: "0.2.0", + version: "0.2.1", elixir: "~> 1.0", name: "Forcex", description: @description, @@ -44,7 +44,7 @@ defmodule Forcex.Mixfile do # Type `mix help deps` for more examples and options defp deps do [ - {:httpoison, "~> 0.5"}, + {:httpoison, "~> 0.8"}, {:exjsx, "~> 3.1"}, {:timex, "~> 2.0"}, {:excoveralls, "~> 0.5", only: :test},