在新的鳳凰應用程序中,Plug.Head插件默認存在,我對它的重要性很感興趣。 我知道「the HEAD method is identical to GET except that the server MUST NOT send a message body in the response」。 我覺得official Phoenix guides是一流的,但是這把我關在Routing guid
我正在嘗試在Elixir中設置一個非常簡單的基本HTTP API。我認爲使用鳳凰這種東西完全是過火,所以想用Plug來簡單地做。我可以通過設置這樣的基本路由器來實現: defmodule Example.Router do
use Plug.Router
plug Plug.Logger
plug :match
plug :dispatch
g