-
This function is called by the Kitura
Router
when an incoming request matches the route provided when the BodyParser was registered with theRouter
. It performs the parsing of the body content usingparse(_:contentType)
. We don’t expect a user to call this function directly.Declaration
Swift
override public func handle(request: RouterRequest, response: RouterResponse, next: @escaping () -> Void) throws
Parameters
request
The
RouterRequest
object used to work with the incoming HTTP request.response
The
RouterResponse
object used to respond to the HTTP request.next
The closure called to invoke the next handler or middleware associated with the request.