Vapor: 4.0.0-beta.2.1 Release

Release date:
December 11, 2019
Previous version:
4.0.0-beta.2 (released December 9, 2019)
Magnitude:
257 Diff Delta
Contributors:
1 total committer
Data confidence:
Commits:

Top Contributors in 4.0.0-beta.2.1

tanner0101

Directory Browser for 4.0.0-beta.2.1

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

  • Access to shared HTTPClient is now available via app.client.http (#2120)

  • HTTPClient.Configuration can now be modified via app.client.configuration (#2120)

let app = Application(.testing)
defer { app.shutdown() }

app.client.configuration.redirectConfiguration = .disallow

app.get("redirect") {
    $0.redirect(to: "foo")
}

let server = try app.server.start(hostname: "localhost", port: 8080)
defer { server.shutdown() }

let res = try app.client.get("http://localhost:8080/redirect").wait()

XCTAssertEqual(res.status, .seeOther)
  • app.http has been removed. Each component is now separate (#2120)

  • New app.locks helper for managing synchronization of app extensions (#2120)

  • app.storage now supports registering an onShutdown closure that will run when the app shuts down (#2120)