Trot v0.7.0 Trot.NotFound View Source

Plug for inserting a 404 not found response.

Use this module or plug it in at the end of the plug system. If the connection has not been sent yet, it will be set to 404 with a not found message.

Example

defmodule WhereIsIt.Router do

use Trot.Router

get "/real", do: :ok

use Trot.NotFound

end

Link to this section Summary

Functions

When using import_routes, match/2 is used as the Plug function. Simply passes on to not_found/2

Takes a Plug.Conn and sends a “not found” message to the requestor

Link to this section Functions

When using import_routes, match/2 is used as the Plug function. Simply passes on to not_found/2.

Takes a Plug.Conn and sends a “not found” message to the requestor.