Repository navigation
Configurable 404 and 405
Make configurable HandleResourceNotFound and HandleMethodNotAllowed.
Examples:
b := NewBox()
b.HandleResourceNotFound = func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
w.Write([]byte("HEY! Not Found"))
}
b.HandleMethodNotAllowed = func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusMethodNotAllowed)
w.Write([]byte("HEY! Method Not Allowed"))
}