GitHub PullRequestReviewCommentEvent at 2014-01-26 18:44:26
Repository: plug
Actor: josevalim
Payload: {"comment":{"url":"https://api.github.com/repos/elixir-lang/plug/pulls/comments/9176837","id":9176837,"diff_hunk":"@@ -0,0 +1,19 @@\n+defmodule Plug.MethodOverride do\n+  def call(conn, []) do\n+    if conn.method == \"POST\" do\n+      case method_override(conn) do\n+        { _, \"DELETE\" } -> { :ok, conn.method(\"DELETE\") }\n+        { _, \"PUT\" }    -> { :ok, conn.method(\"PUT\") }\n+        { _, \"PATCH\" }  -> { :ok, conn.method(\"PATCH\") }\n+                     _  -> { :ok, conn }\n+      end\n+    else\n+      { :ok, conn }\n+    end\n+  end\n+\n+  defp method_override(Plug.Conn[req_headers: req_headers] = conn) do\n+    { :ok, conn } = Plug.Parsers.call(conn, parsers: [Plug.Parsers.URLENCODED])","path":"lib/plug/method_override.ex","position":16,"original_position":16,"commit_id":"7cbf36ff8e872b014c1f55dc8e568561a2318d78","original_commit_id":"7cbf36ff8e872b014c1f55dc8e568561a2318d78","user":{"login":"josevalim","id":9582,"avatar_url":"https://gravatar.com/avatar/e837f6b7fd146ab16ed3d663476c063e?d=https%3A%2F%2Fidenticons.github.com%2Fe20b21ae6508f22fc189c60a0880d0b8.png&r=x","gravatar_id":"e837f6b7fd146ab16ed3d663476c063e","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"body":"I don't think we should automatically call the other plug, we should just say we expect the params to be already fetched. :)","created_at":"2014-01-26T18:44:26Z","updated_at":"2014-01-26T18:44:26Z","html_url":"https://github.com/elixir-lang/plug/pull/8#discussion_r9176837","pull_request_url":"https://api.github.com/repos/elixir-lang/plug/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/plug/pulls/comments/9176837"},"html":{"href":"https://github.com/elixir-lang/plug/pull/8#discussion_r9176837"},"pull_request":{"href":"https://api.github.com/repos/elixir-lang/plug/pulls/8"}}}}