 defmodule Trot.Router do
+  alias Plug.Conn.Status
+
   @doc false
   defmacro __using__(_opts) do
     quote do

    Plug.Conn.send_resp(conn, code, body)
  end
  def make_response(body, conn) when is_binary(body) do
    Plug.Conn.send_resp(conn, 200, body)
  end
  def make_response(body, conn) do
    body = Poison.encode!(body)
    Plug.Conn.send_resp(conn, 200, body)
  end

  defmacro get(path, options \\ [], do: body), do: compile(:get, path, options, body)

  defmacro __before_compile__(_env) do
    quote do
      defp do_match(_method, _path, _host) do
        fn (conn) -> send_resp(conn, Status.code(:not_found), "<html><body>Not Found</body></html>") end
      end
    end
  end
