Vapor v4.0.0 Release Notes

Release Date: 2019-08-02 // 6 months ago
    • ⚡️ Updated to OpenCrypto alpha 2 (#2031)
    • ⚡️ Updated to SSWG's official AsyncHTTPClient package (#2031)
    • 🔀 Merged server and client websocket code into WebSocket (#2031)

      // client return WebSocket.connect( to: "ws://echo.websocket.org/", on: req.eventLoop) { ws in ws.send("Hello, world!") ws.onText { ws, text in promise.succeed(text) ws.close().cascadeFailure(to: promise) } }// serverrouter.webSocket("bar") { req, ws in ws.send("Hello, world!") ws.onText { ws, text in promise.succeed(text) ws.close().cascadeFailure(to: promise) } }

    • BCrypt renamed to Bcrypt and included in Vapor (#2031)

      let hash = try Bcrypt.hash("vapor")print(hash) // $2b$12$Lmw/Zx2jSXgxE.r/8uipROCoh64KdPL7/mdEz38EqEFZDEu5JsAH2try Bcrypt.verify("vapor", created: hash) // truetry Bcrypt.verify("foo", created: hash) // false


Previous changes from v4.0.0-alpha.1