OkHandler is a default 200 OK handler
(reqID string, rw ResponseWriter, req *http.Request)
| 159 | |
| 160 | // OkHandler is a default 200 OK handler |
| 161 | func (r *Router) OkHandler(reqID string, rw ResponseWriter, req *http.Request) *Error { |
| 162 | rw.Header().Set(httpheaders.ContentType, "text/plain") |
| 163 | rw.WriteHeader(http.StatusOK) |
| 164 | rw.Write([]byte{' '}) // Write a single byte to make AWS Lambda happy |
| 165 | |
| 166 | return nil |
| 167 | } |
| 168 | |
| 169 | // add adds an abitary route to the router |
| 170 | func (r *Router) add(method, path string, handler RouteHandler, middlewares ...Middleware) *route { |
nothing calls this directly
no test coverage detected