Skip to content

Add support for string interpolation to URI

Compare
Choose a tag to compare
@tanner0101 tanner0101 released this 16 Jul 17:24
6a552c6
This patch was authored by @dimitribouniol and released by @tanner0101.

Enables call sites that use URIs to allow for string literals that make use of interpolation (#2442).

app.get("hello") { req -> EventLoopFuture<String> in
    return req.client.get("\(Constants.basePath)/status")
    .flatMapThrowing { res throws in
        return "Hello, world!"
    }
}