NotFoundHandler is default 404 handler
(reqID string, rw ResponseWriter, req *http.Request)
| 150 | |
| 151 | // NotFoundHandler is default 404 handler |
| 152 | func (r *Router) NotFoundHandler(reqID string, rw ResponseWriter, req *http.Request) *Error { |
| 153 | rw.Header().Set(httpheaders.ContentType, "text/plain") |
| 154 | rw.WriteHeader(http.StatusNotFound) |
| 155 | rw.Write([]byte{' '}) // Write a single byte to make AWS Lambda happy |
| 156 | |
| 157 | return nil |
| 158 | } |
| 159 | |
| 160 | // OkHandler is a default 200 OK handler |
| 161 | func (r *Router) OkHandler(reqID string, rw ResponseWriter, req *http.Request) *Error { |
no test coverage detected