So we think we encountered a regression in routing...
# ktor
s
So we think we encountered a regression in routing. This test fails and something similar used to work in 0.3.0:
Copy code
@Test fun `host with routing on POST user with parameter`() = withTestApplication {
        var username = ""
        application.routing {
            route("user") {
//                param("name") {
                optionalParam("name") {
                    method(HttpMethod.Post) {
                        handle {
                            username = call.parameters["name"] ?: "foo"
                        }
                    }
                }
            }
        }
        on("making post request to /user with query parameters") {
            handleRequest {
                uri = "/user"
                method = HttpMethod.Post
                this.body="name=john"
                val contentType = ContentType.Application.FormUrlEncoded.toString()
                addHeader("content-type", contentType)
            }
            it("should have extracted username") {
                assertEquals("john", username)
            }
        }
    }