bkenn
02/04/2018, 3:38 AMhallvard
02/05/2018, 7:18 AMtoMap()
. Am I missing something?trathschlag
02/05/2018, 9:53 AMelizarov
02/07/2018, 1:06 PMCallLogging
Ktor feature to INFO
and use INFO
as a default log threshold in all the sample log configuration files. So, by default, INFO
, WARN
, and ERROR
will get printed. The idea that you should see all the requests in your logs and if you want to get more detailed logs (DEBUG
or TRACE
) from certain subsystems/parts of your Ktor app, then you can go and turn on finer-grained logging level for those subsystems. What do you think? What is you experience with logging level?Michael Kotlikov
02/07/2018, 9:52 PMmbickel
02/09/2018, 2:14 PMpost()
handler, go through all the multiparts and if I find a FileItem
, I store it, send a redirect and want to be done. Of course, if there's none, I want to redirect back to the main site. But my code always runs into the second redirect (in addition to the first one).Michael Kotlikov
02/11/2018, 12:09 AM0.9.1
?
fun main(args: Array<String>) {
val server = embeddedServer(Netty, commandLineEnvironment(args))
server.start()
}
aeruhxi
02/12/2018, 8:23 AMcall.receive<SomeDataClass>()
parse json string?lifk
02/12/2018, 9:03 PMneworldlt
02/13/2018, 8:29 PMapplication/json
, I would like serialize exception using gson. If client asks text/html
, then simple html page and for text/plain
print only message.Dan T
02/13/2018, 11:40 PMeverald
02/14/2018, 9:55 AMktor-auth-jwt
as a dependecy and I now wonder why I have a transitive dependency for ktor-server-test-host
. I searched among the dependency tree and found that ktor-auth
declares it. Excluding it within my build file would be an option but is there any need for this to be not declared as testCompile
?adeln
02/17/2018, 10:16 AMmiha-x64
02/18/2018, 4:24 PM[nettyWorkerPool-3-1] WARN i.n.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.nio.channels.ClosedChannelException: null
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(...)(Unknown Source)
Which is the correct way to set an exception handler to Netty while using ktor?Michael Kotlikov
02/18/2018, 11:05 PMnewSingleThreadContext()
instead?
https://github.com/Kotlin/kotlinx.coroutines/blob/master/coroutines-guide.md#dispatchers-and-threadsMichael Kotlikov
02/19/2018, 2:26 AMGsonBuilder
and not only configure it in the gson
block:
install(ContentNegotiation) (
gson {
setDateFormat(DateFormat.LONG)
}
}
like this:
install(ContentNegotiation) (
gson(existingGsonBuilder)
}
Zaid
02/19/2018, 5:03 PMres.status(200).json({"message":"foo","something":"something"})
I am trying to reproduce the same functionality with ktor and below is what i tried and it is not getting captured at client side, can someone please help me to wright it in ktor (in single line if possible )
call.response.status(HttpStatusCode.OK)
val item = ResponseJson("foo" , "something")
call.respond(item)
tjb
02/20/2018, 8:25 PMno main manifest attribute, in /my_app.jar
was the errorhallvard
02/20/2018, 9:43 PMStatusPages
do not implement the 418 status code ... Outrageous!spand
02/22/2018, 3:33 PMribesg
02/24/2018, 11:03 AMresource("/{...}", "static/index.html")
.
My problem was that I was trying to use resource("*", "static/index.html")
or resource("/*", "static/index.html")
, but it doesn't work as /*
matches /a
but not /a/b
. Something like /**
would make much more sense than /{...}
imhojkbbwr
02/27/2018, 11:34 AMribesg
02/27/2018, 3:32 PMjkbbwr
02/27/2018, 8:27 PMrpalcolea
02/27/2018, 11:48 PMjoshr
02/28/2018, 5:02 AMfrellan
03/01/2018, 8:58 PMaeruhxi
03/02/2018, 6:07 AMgaetan
03/02/2018, 11:32 AM/path
to ‘/path/’ because the HTML returned by ‘/path/’ has some relative paths for images, css, …
But when I declare theses 2 paths in routing
, ktor seems to make no difference between them.gin
03/04/2018, 12:36 PMgin
03/04/2018, 12:36 PMmiha-x64
03/04/2018, 12:44 PMcompile "io.ktor:ktor-html-builder:$ktor_version"
gin
03/04/2018, 12:51 PM