 
 public struct Route {
 
-	public typealias Middleware = (request: MatchedRequest, next: (MatchedRequest) throws -> Response) throws -> Response
+	public typealias Middleware = (request: Request, next: (Request) throws -> Response) throws -> Response
 	
 	public let method: Method
 	public let wildcardPath: WildcardPath

	}
	
	public func handle(request: Request) throws -> Response {
		let matchedRequest = MatchedRequest(request: request, route: self)
		return try handle(matchedRequest, middlewareGenerator: middleware.generate())
	}
	
	private func handle(request: MatchedRequest, middlewareGenerator: IndexingGenerator<[Middleware]>) throws -> Response {
		var mutableMiddlewareGenerator = middlewareGenerator
		if let middleware = mutableMiddlewareGenerator.next() {
			return try middleware(request: request, next: { (aRequest) -> Response in

			})
		}
		
        let matchedRequest = MatchedRequest(request: request, route: self)
        guard let response = handler.perform(matchedRequest) else {
            throw RoutingError.NotFound(request.method, request.path)
        }
        
        return response
