Casey Brooks
11/22/2019, 7:58 PMgotoOla
11/23/2019, 5:54 PMTimur Atakishiev
11/24/2019, 1:04 PMbod
11/24/2019, 4:20 PMgotoOla
11/24/2019, 9:46 PMcymessmer
11/25/2019, 8:43 PMHexa
11/25/2019, 9:54 PMtestproject_1 | java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path
testproject_1 | at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
testproject_1 | at java.lang.Runtime.loadLibrary0(Runtime.java:870)
testproject_1 | at java.lang.System.loadLibrary(System.java:1122)
testproject_1 | at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
testproject_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
testproject_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
testproject_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
testproject_1 | at java.lang.reflect.Method.invoke(Method.java:498)
testproject_1 | at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
testproject_1 | at java.security.AccessController.doPrivileged(Native Method)
testproject_1 | at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
testproject_1 | at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
testproject_1 | at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
testproject_1 | at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:186)
testproject_1 | at io.netty.channel.epoll.Native.<clinit>(Native.java:57)
testproject_1 | at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:38)
testproject_1 | at io.ktor.server.netty.EventLoopGroupProxy$Companion.create(NettyApplicationEngine.kt:186)
testproject_1 | at io.ktor.server.netty.NettyApplicationEngine.<init>(NettyApplicationEngine.kt:74)
testproject_1 | at io.ktor.server.netty.Netty.create(Embedded.kt:14)
testproject_1 | at io.ktor.server.netty.Netty.create(Embedded.kt:12)
testproject_1 | at io.ktor.server.engine.EmbeddedServerKt.embeddedServer(EmbeddedServer.kt:79)
testproject_1 | at com.mycomp.tst.service.AppKt.main(App.kt:18)
Lauritz Hilsøe
11/26/2019, 9:59 AMPatrick Jackson
11/26/2019, 6:06 PMval byteArray = ByteArray(throwable.response.content.availableForRead)
response.content.readfully(response.content.availableForRead)
val text = String(byteArray, 0, byteArray.size, Charsets.UTF_8)
When debugging and stepping through it reads the response fine. Without stepping through text
is an empty String. Seems like a race condition. Will readFully
stream the complete content? Or is there some sort of waiting that must be done for the request to complete?Hexa
11/27/2019, 6:48 AM@Suppress("unused")
do here
@Suppress("unused") // Referenced in application.conf
fun Application.module()
ribesg
11/27/2019, 2:04 PMCyberpunk Keanu
11/28/2019, 1:24 PMAndrey Tarasevich
11/28/2019, 1:32 PMCallLogging
feature the bad request message is logged to the default level setup in CallLoggin feature configuration. So if I have a default level INFO
then I'll see something like this in logs
{
"level": "INFO",
"logger": "Application",
"message": "400 Bad Request: POST - <routing_path>"
}
Is there a way to change the logging level of such request?
Even if I do something like this in the CallLogging
configuration, the log level is still a default one, i.e. INFO
in my case
filter { call ->
val status = call.response.status()?.value
level = Level.WARN
status !in (200..399)
}
george_racu
11/28/2019, 2:25 PMHexa
11/28/2019, 6:57 PMJoris
11/29/2019, 10:38 AMapplication/vnd.api+json
that in the end is also Json ?
My current settings for ContentNegotiation
install(ContentNegotiation) {
jackson {
enable(SerializationFeature.INDENT_OUTPUT)
disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
registerKotlinModule()
}
}
andreasmattsson
11/29/2019, 1:01 PMneil
11/29/2019, 9:22 PMivano
12/01/2019, 12:55 PMJørund Amsen
12/02/2019, 12:32 PMinstall(CORS){
host("*.<http://somedomain.com|somedomain.com>")
}
to work, does it not support the *.
notation?gotoOla
12/03/2019, 5:21 PMthis.context.respond(status = HttpStatusCode.BadRequest, message = "My custom message")
But when performing a request with the ktor-client in a test I can't get that custom message
val response = <http://client.post|client.post>("<http://localhost:8080/test>") { body = "invalidBody" } // If this returns a 400
response.readText() // I'm not able to receive the body "My custom message" from this readText()
Cyberpunk Keanu
12/04/2019, 7:08 AMRobert Menke
12/05/2019, 6:23 PMRené
12/06/2019, 8:53 PMhttpClient.get<some data class>
are working but one is throwing No transformation found: class <http://kotlinx.coroutines.io|kotlinx.coroutines.io>.ByteBufferChannel -> class my.data.Class
Gerard Klijs
12/06/2019, 11:29 PMShan
12/07/2019, 2:01 AMRodrigo Silva
12/08/2019, 2:17 PMizyaboi
12/09/2019, 11:54 AMcoderskitchen
12/09/2019, 12:31 PMrouting {
route("/accounts") {
param("name") {
get {
findAccountsByName(...)
}
}
get {
findAllAccounts()
}
}
so that a
GET /accounts?name=me would execute findAccountsByName(...)
and
GET /accounts would execute findAllAccounts()
Apparently it always executes findAllAccounts(). Any idea why?Luiz Aguiar
12/10/2019, 2:01 PM