Classes
The following classes are available globally.
-
A set of helper functions to make it easier to create, start, and stop Kitura based servers.
See moreDeclaration
Swift
public class Kitura
-
The
Router
class provides the external interface for the routing of requests to the appropriate code for handling. This includes:- Routing requests to closures with the signature of
RouterHandler
- Routing requests to the handle function of classes that implement the
RouterMiddleware
protocol. - Routing the request to a template engine to generate the appropriate output.
- Serving the landing page when someone makes an HTTP request with a path of slash (/).
Declaration
Swift
public class Router
- Routing requests to closures with the signature of
-
A set of helper functions for router path matching using regular expression.
See moreDeclaration
Swift
public class RouteRegex
-
Create an on the fly
See moreRouterMiddleware
from aRouterHandler
closure.Declaration
Swift
public class RouterMiddlewareGenerator: RouterMiddleware
-
Router request.
See moreDeclaration
Swift
public class RouterRequest
-
Router response that the server sends as a reply to
See moreRouterRequest
.Declaration
Swift
public class RouterResponse
-
Router middleware for parsing the body of the request.
See moreDeclaration
Swift
public class BodyParser: RouterMiddleware
-
A set of APIs to work with Content-Type headers, whether to generate the value or to determine if it’s an acceptable value.
See moreDeclaration
Swift
public class ContentType
-
A router middleware that serves static files from a given path.
See moreDeclaration
Swift
public class StaticFileServer: RouterMiddleware