code: func DecodeRequest(w http.ResponseWriter, r *http.Request, req interface{}) (err error) {
  	if err = json.NewDecoder(r.Body).Decode(req); err != nil {
  		http.Error(w, err.Error(), http.StatusBadRequest)
  	}
  	return
  }
docs: // DecodeRequest decodes an http request into a given structure.