func wantsHTML(r *http.Request, m *mux.RouteMatch) bool { mostAccepted := common.MostAccepted(r, "text/html", "Accept") return mostAccepted == "text/html" || mostAccepted == "*/*" }
func wantsJSON(r *http.Request, m *mux.RouteMatch) bool { return common.MostAccepted(r, "text/html", "Accept") == "application/json" }