Antero Duarte
01/10/2019, 11:59 AMhandle {}
, because I really like the DSL for get{}
, put{}
, post{}
...etccoder82
01/10/2019, 12:41 PMhmole
01/10/2019, 1:59 PMApplicationFeature
that catches all errors inside routing, and depending on the exception type throws again or handles if to return normal response?alexfacciorusso
01/10/2019, 5:13 PMAn operation is not implemented: Obtaining serializer from KClass is not available on native due to the lack of reflection. Use .serializer() directly on serializable class.
zjuhasz
01/11/2019, 11:48 AMTobi
01/11/2019, 2:54 PMio.ktor.client.engine.mock.MockEngine
in my multiplatform project commonTest
source set in order to test my engine configuration, but I can’t import it 🤔
I added implementation "io.ktor:ktor-client-mock:$ktor_version"
to my commonTest.dependencies
closure in the multiplatform build.gradle
, but it seems like the dependency can’t be resolved.
Any ideas?coletz
01/11/2019, 5:52 PMcoletz
01/11/2019, 7:30 PMGlobalScope.launch {
try {
val res = HttpClient().post<String> {
url("<http://172.16.94.217:3000/>")
body = "HELLO WORLD!"
}
Log.e("RES", res)
} catch (e: Exception){
e.printStackTrace()
}
}
I get a 400 bad request, while removing the body I get a response. The problem is not server side, since the server is not even receiving a call if I add the body
Am I the only one getting this behaviour? Hadn't tried with older version atmMarc Knaup
01/12/2019, 4:42 PM2019-01-12 17:37:02.237 WARN i.n.u.c.AbstractEventExecutor - A task raised an exception. Task: DispatchedContinuation[DispatcherWithShutdown@60dcb7b6, Continuation at com/github/fluidsonic/fluid/mongo/CoroutineMongoCollection.insertOne(CoroutineMongoCollection.kt:250)@735b9ac6]
kotlinx.coroutines.DispatchException: Unexpected exception running DispatchedContinuation[DispatcherWithShutdown@60dcb7b6, Continuation at com/github/fluidsonic/fluid/mongo/CoroutineMongoCollection.insertOne(CoroutineMongoCollection.kt:250)@735b9ac6]
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:237)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: No more continuations to resume
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:197)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:168)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:63)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:118)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:45)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
... 6 common frames omitted
jdiaz
01/12/2019, 10:14 PMHttpClient
and the curl dependency shows as red in IntelliJ)
implementation "io.ktor:ktor-client-core:1.1.1"
implementation "io.ktor:ktor-client-core-native:1.1.1"
implementation "io.ktor:ktor-client-json-native:1.1.1"
implementation "io.ktor:ktor-client-curl:1.1.1"
hmole
01/13/2019, 12:12 PMalexfacciorusso
01/13/2019, 5:09 PMzjuhasz
01/14/2019, 10:24 AMCoroutineDispatcher
used in ktor websocket? I’d like to consume the messages on a single threaded dispatcher. As a workaround I am resending the messages on a new channel and consuming them from a coroutine I launched on the dispatcher I want.vonox7
01/14/2019, 2:46 PMsngrekov
01/14/2019, 4:26 PMansman
01/14/2019, 8:46 PMyuya_horita
01/15/2019, 8:16 AMctierney
01/15/2019, 6:17 PMget("/foo/{param1}/bar" { ... }
When I access call.parameters["param1"]
the type is String?
. My question is, can this ever actually be null? What situation would lead to a request with no value for param1
being routed to that handler?
(I am avoiding the Locations feature for now since it is marked experimental.)vonox7
01/15/2019, 8:23 PM<http://localhost:8090/asdf>
leads to the ADMIN route? Shoudn’t no route be taken?
embeddedServer(Netty, port = 8090) {
// <http://localhost:8090/admin-prefix-hello> --> "ADMIN" (OK)
// <http://localhost:8090/subdirectory/hello> --> "Wildcard 404" (OK)
// <http://localhost:8090/asdf> --> "ADMIN" (WHAT? Why did it take that route?)
install(Routing) {
route("admin-prefix-{...}", HttpMethod.Get) {
handle {
call.respond("ADMIN")
}
}
route("subdirectory") {
route("{...}", HttpMethod.Get) {
handle {
call.respond("Wildcard 404")
}
}
}
}
}.start()
ansman
01/15/2019, 9:24 PMwilyarti
01/16/2019, 6:05 AMspierce7
01/16/2019, 9:38 PMlouiscad
01/17/2019, 9:29 AMgotoOla
01/17/2019, 3:52 PMwilyarti
01/19/2019, 9:46 AMadeln
01/20/2019, 8:18 AMhyukchan
01/21/2019, 12:40 PMMatt
01/23/2019, 3:21 PMCookie.expires
has become a GMTDate
-- what was the thinking behind moving away from standard Java date types to a homebrewed date API?Alexander
01/23/2019, 4:04 PMK/N
or ktor
. When I add next dependencies to my program
commonMain {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-common"
implementation "io.ktor:ktor-client-core:1.1.1"
implementation "io.ktor:ktor-client-json:1.1.1"
}
}
linuxMain {
dependencies {
implementation "io.ktor:ktor-client-json-native:1.1.1"
}
}
even K/N
executable with an empty main function crashes on exit with next assertion:
/opt/buildAgent/work/4d622a065c544371/runtime/src/main/cpp/Memory.cpp:1129: runtime assert: Memory leaks found
zsh: abort (core dumped) ./build/bin/linux/main/debug/executable/kafka-connect-rest-client.kexe
jkbbwr
01/23/2019, 11:56 PMException in thread "main" io.ktor.http.cio.ParserException: No HTTP header value provided for name X-Accepted-OAuth-Scopes:
Anyone how I get client to ignore empty headersjkbbwr
01/23/2019, 11:56 PMException in thread "main" io.ktor.http.cio.ParserException: No HTTP header value provided for name X-Accepted-OAuth-Scopes:
Anyone how I get client to ignore empty headerscy
01/24/2019, 10:09 PMjkbbwr
01/24/2019, 11:18 PM