   @spec load(%SnakeForm{}, %GameForm{}) :: Response.t
   def load(%{url: url}, data, request \\ &HTTP.post/4) do
     request_url = url <> "/start"
-    api_response = response(request_url, request, Snake, @load_whitelist, data)
+    api_response = response(request_url, request, data)
     update_in(api_response.parsed_response, fn
       {:ok, snake} ->
       (
-        snake = put_in(snake.url, url)
+        snake = put_in(snake["url"], url)
         {:ok, snake}
       )
       error ->


  require Logger

  @load_whitelist ~w(color head_url name taunt)a
  @move_whitelist ~w(move taunt)a

  @callback load(%SnakeForm{}, %GameForm{}) :: Response.t
  @callback move(%Snake{}, %World{}) :: Response.t

        error
      )
    end)
    |> do_load
  end

  def do_load(response) do
    update_in response.parsed_response, fn
      {:ok, map} ->
      (
        {:ok, cast_load(map)}
      )
      response ->
        response
    end
  end

  def cast_load(map) do
    data = %Snake{}
    types = %{color: :string,
              head_url: :string,
              name: :string,
              taunt: :string, url: :string}
    {data, types}
    |> Changeset.cast(map, Map.keys(types))
    |> Changeset.validate_required([:name])
    |> Changeset.apply_changes
  end


  @doc """
  Get the move for a single snake.
