 
   error case
   ### Not found
-  iex> error = %{"message" => "not found.", "status_code" => "404"}
-  iex> error[:status_code]
+  iex> error = %{"message" => "Not found items.", "status_code" => "404"}
+  iex> error["status_code"]
   "404"
 
   """


  defp get_body_xml({:ok, %HTTPoison.Response{status_code: 200, body: body}}), do: body

  defp get_body_xml({:ok, %HTTPoison.Response{status_code: 404}}), do: ~s({"status_code": "404", "message": "Not found items."})

  defp get_body_xml({:error, %HTTPoison.Error{reason: reason}}), do: IO.inspect reason


    headers = [{"Accept", "application/json; charset=UTF-8"}]
    HTTPoison.get(AppStore.rss_json(app_id, locale), headers)
    |> get_body_json
  end

  defp get_body_json({:ok, %HTTPoison.Response{status_code: 200, body: body}}), do: body |> Poison.decode!

  defp get_body_json({:ok, %HTTPoison.Response{status_code: 404}}), do: error_404

  defp get_body_json({:error, %HTTPoison.Error{reason: reason}}), do: IO.inspect |> Poison.decode! reason

  @doc """
  Get XML formatted response from Apple Server.
