package http import "net/http" func IsFormContentCheck(innerHandler http.Handler) http.Handler { outerHandler := func(w http.ResponseWriter, r *http.Request) { // TOdo: contentType := r.Header.Get("Content-Type") if contentType != "application/x-www-form-urlencoded" { w.WriteHeader(http.StatusNotAcceptable) return } innerHandler.ServeHTTP(w, r) } return http.HandlerFunc(outerHandler) }