Swiftpack.co - Package - vapor/vapor


Documentation Team Chat MIT License Continuous Integration Swift 4.1 Twitter

Vapor is a web framework for Swift. It provides a beautifully expressive and easy to use foundation for your next website, API, or cloud project.

Take a look at some of the awesome stuff created with Vapor.

💧 Community

Join the welcoming community of fellow Vapor developers on Discord.

🚀 Contributing

To contribute a feature or idea to Vapor, create an issue explaining your idea or bring it up on Discord.

If you find a bug, please create an issue.

If you find a security vulnerability, please contact security@vapor.codes as soon as possible.

💙 Code of Conduct

Our goal is to create a safe and empowering environment for anyone who decides to use or contribute to Vapor. Please help us make the community a better place by abiding to this Code of Conduct during your interactions surrounding this project.

🏫 Tutorials

The awesome Vapor community is always adding new tutorials and articles out there, Vapor University is a great place to get started!

👥 Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

🥇 Sponsors

Proudly sponsored by Nodes (🏅), Skelpo (🥉), and our Open Collective sponsors.


Michael Dominick



Stars: 14424
Help us keep the lights on


3.0.6 - Jul 5, 2018


  • Removed extraneous copy of ConsoleLogger (#1746).

3.0.5 - Jun 19, 2018


  • ApplicationResponder is now public (#1704).

3.0.4 - Jun 5, 2018


  • Fixed an issue where URL query strings could be doubly precent encoded (#1692, #1687).
  • Fixed a typo in a default argument for max body size in NIOServer (#1691).

3.0.3 - May 16, 2018


  • Making on(), custom route methods public.
public func on<T>(_ method: HTTPMethod, at path: PathComponentsRepresentable..., use closure: @escaping (Request) throws -> T) -> Route<Responder>
public func on<T>(_ method: HTTPMethod, at path: [PathComponentsRepresentable], use closure: @escaping (Request) throws -> T) -> Route<Responder>

3.0.2 - May 9, 2018


  • New method Request.makeResponse(_:as:) for responding with HTTPBodyLosslessRepresentable content (#1657).
// new API accepts HTTPBodyLosslessRepresentable object
router.get("hello") { req in
    return req.makeResponse("Hello!")

// you can also specify a content type
router.get("hello-html") { req in
    return req.makeResponse("Hey!", as: .html)

// existing API that accepts non-HTTPBodyLosslessRepresentable content
router.get("hello-json") { req in
    let res = req.makeResponse()
    try res.content.encode(["hello": "world"], as: .json)
    return res
  • New method router.on(...) that accepts a non-variadic array of path components (#1658, #1666).


  • BlockingIOThreadPool is now a singleton, shared across all containers (#1665).
  • Middleware is now applied in the correct order when using router.grouped(...) and router.group(...) (#1663).
  • Errors reported to Logger now correctly display the error message (#1660).

API Docs: https://api.vapor.codes/vapor/latest/Vapor

Milestone: 3.0.2