Tim Condon

Results 523 comments of Tim Condon

You should be able to do this by providing a custom closure to the Error Middleware. However, since it's required as part of [RFC 2617](https://tools.ietf.org/html/rfc2617#section-1.2) this is something Vapor should...

@mman apologies for the delay. You could do something like ```swift // ... let response = Response(status: status, headers: headers) // ... if status == .unauthorized { response.headers.replaceOrAdd(name: "WWW-Authenticate", value:...

@bobvoorneveld Thanks for this! Just a note to say it hasn't been forgotten, I just to spend some time to sit down and read the form spec etc to make...

You can use `Parameter.Any` IIRC to do a catch all

```swift router.get(PathComponent.anything) { req in // Handle all routes } ```

Ah, you can't do that with Vapor at the moment. You'll need to create a function for each HTTP type

You'll need to register each method with the `PathComponents.anything` when you do `et route = Route(path: [...] , output: responder)`

To add a few things to this: * The SSWG recently released a [log level guide](https://github.com/swift-server/guides/blob/main/docs/libs/log-levels.md) for libraries. Vapor has moved most of it's code over to follow these rules,...

Ah right, see what you mean now. Yes there's definitely something going on when you create an `Application` and execute it from the command line. I'm not sure if this...

You do something like: ```swift app.get { req -> EventLoopFuture in return req.view.render("index", LaunchingPage.shared).encodeResponse(for: req).map { response in response.headers.add(name: .link, value: "; rel=preload; as=style") return response } } ```