Halil Ozercan
03/26/2020, 1:45 PMpingInterval
and maxFrameSize
as constructor parameters, install(WebSockets)
does not have a configuration option. So, I’m now stuck, not able to turn on a feature that already exists.
Furthermore, maxFrameSize
is passed to DefaultWebSocketSession
as
return DefaultWebSocketSession(this, pingInterval, maxFrameSize)
it turns out, third parameter is actually timeoutMillis
not related to frameSize at all.
I’ve made necessary changes to client WebSockets feature to actually take configuration and added timeoutMillis
. Do you think I should make a pull request? It is a really small change and backward compatible.Paulius Ruminas
03/26/2020, 6:35 PM@Serializable
sealed class PaymentResult {
@Serializable
object Authorised : PaymentResult()
@Serializable
data class Error(val refusalReason: String) : PaymentResult()
@Serializable
data class Refused(val refusalReason: String, val refusalReasonCode: String) : PaymentResult()
}
we have installed json content negotiation:
install(ContentNegotiation) {
json(json)
}
we respond with:
call.respond(PaymentResult.Authorised)
currently it returns: {}
is it possible to use polymorphic serializer for responses?Sam Garfinkel
03/26/2020, 7:48 PMasync { request { } }
but still would nice to eliminate the boilerplate.Gabriel Feo
03/26/2020, 10:22 PMMar 26, 2020 9:58:28 PM io.grpc.internal.ManagedChannelImpl$1 uncaughtException
SEVERE: [Channel<1>: (<http://firestore.googleapis.com:443|firestore.googleapis.com:443>)] Uncaught exception in the SynchronizationContext. Panic!
java.lang.IllegalStateException: Could not find policy 'pick_first'. Make sure its implementation is either registered to LoadBalancerRegistry or included in META-INF/services/io.grpc.LoadBalancerProvider from your jar files.
2020-03-26 22:08:04.961 [nioEventLoopGroup-4-1] ERROR Application - Unhandled exception caught for CoroutineName(call-handler)
com.google.api.gax.rpc.InternalException: io.grpc.StatusRuntimeException: INTERNAL: Panic! This is a bug!
napperley
03/27/2020, 1:48 AMDarmaheev
03/27/2020, 9:06 AMmavenLocal()
maven { url "<https://kotlin.bintray.com/kotlinx>" }
mavenCentral()
mbonnin
03/29/2020, 11:58 AMactual fun macOSMain() {
GlobalScope.launch(mainDispatcher) {
val response = HttpClient {
}.get<HttpResponse>("<https://google.com/>") {
}
println("response status is: ${response.status}")
}
CFRunLoopRun()
}
Full repo at: https://github.com/martinbonnin/kmpCli/blob/ktor-hangsRodrigo Silva
03/30/2020, 5:09 PMbmarinovic
03/30/2020, 8:42 PMString?
or Optional<String>
?Rodrigo Silva
03/31/2020, 1:24 AMKurt Renzo Acosta
03/31/2020, 9:45 AMdefaultRequest
block and set up the Authorization header there but I can't seem to find anything to "intercept" it if it needs to be refreshed. Thanks in advance!bitkid
03/31/2020, 12:20 PM2020-03-31 12:14:53.832 [nioEventLoopGroup-4-2] DEBUG Application - 200 OK: GET - /api/repositories/1/matrices/1/data
2020-03-31 12:15:07.621 [nioEventLoopGroup-3-2] DEBUG Application - I/O operation failed
<http://java.io|java.io>.IOException: Connection reset by peer
at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at java.base/sun.nio.ch.SocketDispatcher.read(Unknown Source)
at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:251)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1133)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Unknown Source)
diesieben07
03/31/2020, 3:13 PMContentNegotiation
feature with Jackson for JSON bodies Ktor responds with HTTP 500 if the client sends invalid JSON or JSON that does not match the data classes I am trying to receive. I would expect HTTP 400 instead. Is there a way to configure this?Dave Leeds
03/31/2020, 5:18 PMAccept-Encoding
header for my Ktor HttpClient
. I found the ContentEncoding
feature (https://github.com/ktorio/ktor/blob/master/ktor-client/ktor-client-features/ktor-client-encoding/common/src/ContentEncoding.kt) but I don’t see that compression
package in my ktor-client-core-jvm
jar. Is it published under a separate artifact? Or am I just looking for it in the wrong place?Robert Jaros
03/31/2020, 8:52 PMAccept: application/xml;application/json
header when I call:
<http://httpClient.post|httpClient.post>(serviceUrl) {
contentType(ContentType.Application.Json)
accept(ContentType.Application.Xml)
body = MyClass(...)
}
Does such header even conform to HTTP standard?Dariusz Kuc
03/31/2020, 11:22 PMMarc Knaup
04/02/2020, 2:05 PMJob.cancel()
throws a CancellationException
itself?
Or is this a bug in Ktor?
java.util.concurrent.CancellationException: Job was cancelled
at io.ktor.client.engine.UtilsKt$attachToUserJob$cleanupHandler$1.invoke(Utils.kt:77)
at io.ktor.client.engine.UtilsKt$attachToUserJob$cleanupHandler$1.invoke(Unknown Source:2)
…
at kotlinx.coroutines.JobSupport.cancel(JobSupport.kt:614)
at kotlinx.coroutines.Job$DefaultImpls.cancel$default(Job.kt:164)
Gunslingor
04/03/2020, 3:20 PM@Scheduled(fixedRate = 60000)
crummy
04/04/2020, 9:30 AMktor-client-gson
instead. I guess that's because I needed an implementation?bitkid
04/06/2020, 11:21 AMPacane
04/06/2020, 12:42 PMcrummy
04/07/2020, 1:34 AMHoconApplicationConfig(ConfigFactory.load()).property("apiKey")
, but this gets cumbersome - is there a way to define a class (or data class) and have its values automatically instantiated from application.conf values?Mark Gilchrist
04/07/2020, 5:00 PMhdarritchon
04/07/2020, 11:54 PMMagno Junior
04/08/2020, 9:36 AMbitkid
04/08/2020, 5:24 PMJohn Peña
04/09/2020, 8:28 PMTimur Atakishiev
04/10/2020, 4:49 AMfun Application.routingModule() {
val courtEndpoint by KodeinModule.kodein.instance<CourtEndpointImpl>()
val userEndpoint by KodeinModule.kodein.instance<UserEndpointImpl>()
val registrationEndpoint by KodeinModule.kodein.instance<RegistrationEndpointImpl>()
val companyEndpoint by KodeinModule.kodein.instance<CompanyEndpointImpl>()
val matchEndpoint by KodeinModule.kodein.instance<MatchEndpointImpl>()
install(Routing) {
court(courtEndpoint)
user(userEndpoint)
registration(registrationEndpoint)
company(companyEndpoint)
match(matchEndpoint)
}
}
Lets say I will have a lot of entities which means I will registrate every routing in that module and I think it will be look not clear as it could be. Is it any approach, to avoid the situation with registration my routes in install section? Thank youTimur Atakishiev
04/10/2020, 8:34 AMimvtr
04/11/2020, 1:09 AMimvtr
04/11/2020, 1:09 AMhhariri
04/12/2020, 7:59 PM