func (h *books) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+ if r.Method != "GET" {
+ w.WriteHeader(http.StatusMethodNotAllowed)
+ return
+ }
w.Header().Set("Content-Type", "application/json")
model := struct {
Message string `json:"message"`