https://kotlinlang.org logo
#ktor
Title
# ktor
n

Nikky

09/19/2018, 2:10 PM
the code that executes the post:
Copy code
@Test
    fun testKotlinxSerializationListPost() = clientTest(CIO) {
        config {
            install(JsonFeature) {
                serializer = KotlinxSerializer()
            }
        }

        test { client ->
            val result = <http://client.post|client.post><List<User>>(path = "/post/users", port = serverPort) {
                body = usersList
                contentType(ContentType.Application.Json)
            }

            assertEquals(usersList, result)
        }
    }