Giovanni Alluvatti
07/14/2020, 12:18 PMNikolay Kasyanov
07/14/2020, 12:38 PMHttpCache
feature work on iOS? I’ve stumbled upon this and am confused: https://github.com/ktorio/ktor/issues/992.Petr Makagon
07/14/2020, 7:45 PMio.ktor.server.cio.HttpServer Fatal exception in coroutines machinery for DispatchedContinuation[ExperimentalCoroutineDispatcher@4bf56b31[scheduler = DefaultDispatcher@1571ced[Pool Size {core = 2, max = 128}, Worker States {CPU = 2, blocking = 1, parked = 0, retired = 0, terminated = 0}, running workers queues = [2c, 0b, 0c], global queue size = 0, Control State Workers {created = 3, blocking = 1}]], Continuation at io.ktor.http.cio.PipelineKt$startConnectionPipeline$1$outputsActor$1.invokeSuspend(Pipeline.kt:77)@7b0cac71]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
andylamax
07/15/2020, 5:17 PMSlackbot
07/16/2020, 8:59 AMAlexander Minyaev
07/16/2020, 9:31 AMHttpClientFeature
after Exception
? Now, I have next code:
override fun install(feature: ExceptionFeature, scope: HttpClient) {
scope.sendPipeline.intercept(HttpSendPipeline.Before) {
for (counter in 0..2) {
try {
proceed()
break
} catch (e: IOException) {
println("IO Error :$counter")
if (counter == 2) {
throw e
}
}
}
}
Rodrigo Silva
07/16/2020, 1:09 PMdevelopment
and deployment
. How do I switch between them?
ktor {
development {
port = 8091
port = ${?DEV_PORT}
}
deployment {
port = 8090
port = ${?PORT}
}
application {
modules = [ com.rjdesenvolvimento.aries.ApplicationKt.module ]
}
}
hhariri
07/17/2020, 10:18 AMHank
07/17/2020, 2:40 PMAvadhut
07/18/2020, 9:43 AMaltavir
07/19/2020, 4:07 PMResponse has already been sent
on CIO when serving static files from resources. Is it normal?Timur Atakishiev
07/20/2020, 7:21 AMaddamsson
07/20/2020, 2:34 PMContentNegotiation
feature? I've been banging my head against the wall for ours and it is still not working for me. I have parameter classes with the @Searializable
annotation:
@Serializable
data class ShowPostURL(
val date: String,
val titleSlug: String,
override val redirectTo: String? = null
)
and no matter what I do call.receive()
won't work. I'm getting HTTP 415
errors and Ktor doesn't even log anything. I've added the serialization support as well:
install(ContentNegotiation) {
json
}
How do I fix this? This is how I'm trying to use it:
accept(ContentType.Any) {
get(operation.route) {
val input = call.receive(ShowPostURL::class)
call.respondText("foo")
}
}
dorf
07/20/2020, 11:33 PMBrendan Weinstein
07/21/2020, 4:02 AMHank
07/22/2020, 2:01 AMandylamax
07/22/2020, 10:43 AMCIO
server is still experimental. And the message says, that it could be removed. Understanding that this is a generic message to all KtroExperimental's
should I refrain from the CIO
server and use Netty
or others? Any assurance for the CIO
server?aleksey.tomin
07/22/2020, 4:26 PMio.ktor:ktor-client-core-native
?Luis Munoz
07/23/2020, 1:14 AMcall.sessions.get<MySession>()
but why isn't there call.sessions.getId or something?Nikolai
07/24/2020, 10:03 AMTask :app:compileKotlinIos
w: skipping /Users/nikolaybaklanov/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-ios-iosarm64/1.3.1/2f594cbbb3394fe255137a805e4b3f02bfcb5cae/ktor-client-ios.klib. The abi versions don't match. Expected '[22]', found '17'. The library produced by 1.3.61-release-13550 compiler
e: Could not find "/Users/nikolaybaklanov/.gradle/caches/modules-2/files-2.1/io.ktor/ktor-client-ios-iosarm64/1.3.1/2f594cbbb3394fe255137a805e4b3f02bfcb5cae/ktor-client-ios.klib" in [/Users/nikolaybaklanov/Projects/OvercomingPain, /Users/nikolaybaklanov/.konan/klib, /Users/nikolaybaklanov/.konan/kotlin-native-macos-1.3.72/klib/common, /Users/nikolaybaklanov/.konan/kotlin-native-macos-1.3.72/klib/platform/ios_arm64].
15:57:23: Task execution finished 'compileKotlinIos'.
My build.gradle for iOS part :
iosMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.8'
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serialization_version"
implementation "io.ktor:ktor-client-ios:$ktor_version"
}
}
kotlin_version=1.3.72
coroutines_version=1.3.0
ktor_version=1.3.1
serialization_version=0.10.0
manlan
07/24/2020, 7:25 PMtylerwilson
07/24/2020, 9:58 PMUser-Agent: Ktor client
Content-Length: 153714
Accept-Language: en-us
Accept-Encoding: br, gzip, deflate
--3e9d8564-2440331c-2bc8a4e3-2a59ce744dd5479a2de37096-3fd591e8-4dbb8fc5-
Content-Disposition: form-data; name="p_comId"
huehnerlady
07/28/2020, 3:10 PMAuthorization
header manually works, but I need to automate it using clientCredentials flow and client-id and client-secret.
So far when I google about it, I just get how to set up oauth with ktor on the server-side, not on the client side.
Has anybody done so and can give me a code example or a link where I can find help?LastExceed
07/29/2020, 10:34 AMByteReadChannel
? i know there is .readUTF8Line()
but what if my string contains newlines ? do i have to convert the string to a bytearray and send that (preceded with its size) or is there a better way ?bitkid
07/29/2020, 12:03 PManthony castillo
07/29/2020, 2:12 PMfun Route.routeA() = route("/a") {
intercept(ApplicationCallPipeline.Call) {
<do_something_a>
}
}
fun Route.routeB() = route("/a/{some_value}") {
intercept(ApplicationCallPipeline.Call) {
<do_something_b>
}
}
routing {
routeB()
routeA()
}
When we send a request to /a/some_value
, the request goes through do_something_a
first before do_something_b
. Is this the expected behavior? Our expectation is that only do_something_b
would be triggered, since in this case routeB
is not a child route of routeA
Note: We separated the routes due to the hope that the interceptor will only be applied to the enclosing route. We have some business requirement where ACL is different on those scenariosPatrick Louis
07/30/2020, 8:18 AMRequestReceiveAlreadyFailedException: Request body consumption was failed
.Alexandre Brown
07/30/2020, 5:25 PMJohn O'Reilly
07/30/2020, 6:05 PMktor
that works with native-mt
version of koltinx coroutines?Sam
07/31/2020, 3:24 AMSam
07/31/2020, 3:24 AMJurriaan Mous
07/31/2020, 5:59 AMSam
07/31/2020, 6:01 AMJurriaan Mous
07/31/2020, 6:06 AMSam
07/31/2020, 6:06 AMJurriaan Mous
07/31/2020, 6:07 AM