andrew
08/01/2019, 9:55 PMList<PaymentStripeCard>
4ntoine
08/02/2019, 7:25 AMimplementation "io.ktor:ktor-client-core:1.2.3"
in common sourseSet and implementation("io.ktor:ktor-client-curl:1.2.3")
in native sourcesSet (macosX64
actually). I can’t access io.ktor.http.Url
in native code:
NativeURL.kt: (3, 8): Unresolved reference: ioIs it multiplatform? Wrong imports? I can see “io.ktor-ktor-http:1.2.3” actually shown in External deps in IDEA. Any suggestions on how to proceed?
Big Chungus
08/02/2019, 8:23 AMShan
08/04/2019, 1:47 AM4ntoine
08/05/2019, 7:40 AMManuel Lorenzo
08/05/2019, 8:53 AMclass ApplicationKtTest {
@Test
fun test1() = withTestApplication({ module(testing = true) }) {
with(handleRequest(HttpMethod.Get, "/")) {
assertEquals(HttpStatusCode.OK, response.status())
}
}
}
but I get Execution failed for task ':test'.
> No tests found for given includes: [ApplicationKtTest.test1](filter.includeTestsMatching)
Manuel Lorenzo
08/05/2019, 1:00 PMbash
isn’t installed?yschimke
08/05/2019, 1:12 PMchristophsturm
08/06/2019, 5:15 PMBig Chungus
08/07/2019, 9:14 AMINFO - 200 OK: GET - <route>, channel failed
mantono
08/08/2019, 6:43 AMvoddan
08/08/2019, 12:43 PMkotlin-logging
? Couldn't find it in the docs. The less xml the better. Thanks!Big Chungus
08/08/2019, 3:24 PMHttpResponse.readText()
is throwing an exceptionTony Blundell
08/09/2019, 3:56 PMChristoph Schnabl
08/09/2019, 6:46 PMnyxcode
08/10/2019, 7:00 PMwuseal
08/11/2019, 5:16 AMtseisel
08/12/2019, 7:38 AMHttpClient
feature for handling OAuth authentication. Here is how it should operate :
1. On each request, if a valid auth token is available, then perform the request by adding the Authorization: Bearer <token>
2. If no token is available or the token expired, then perform a request on a configurable authentication endpoint with provided credentials. If authentication succeeds, save the received token and perform the initial request with the Authorization
header.
I've seen that this kind of features can be implemented using HttpClient
pipelines, but can't find how to use them with my use case. What pipeline/phase should I use ? How to perform the authentication request with the same config (for example JSON deserialization) as the initial request ?Thomas
08/12/2019, 1:00 PMLudd
08/12/2019, 4:05 PMVinicius Araujo
08/13/2019, 5:24 PMNick
08/13/2019, 8:27 PMenvironment.monitor.subscribe(ApplicationStarted)
every time hot-reload happens it will subscribe one more function subscribed call.
is this behaviour normal?davidasync
08/14/2019, 5:27 PMval genre = call.request.queryParameters["genre"]
but only return the first genre which is romance
keochris
08/15/2019, 3:07 PMSam
08/15/2019, 3:52 PM{
"-ZxqaLK58wkKYwibR4PMP": {"prop1": "val1", "prop2": "val2"},
"-fdsafDEW34fSDFjnowe": {"prop1": "val3", "prop2": "val4"},
}
I'm using kotlinx.serialization to deserialize them but am encountering the error: kotlinx.serialization.SerializationException: Can't locate argument-less serializer for interface java.util.Map
when I invoke the service with <http://httpClient.post|httpClient.post><Map<String, MessageResult>>(urlStr)
The error message says that I should provide the serializer explicitly. Is that something I have to configure in my serializer module or something I have to tell ktor's json feature to do?coder82
08/15/2019, 11:01 PMAlexander
08/16/2019, 1:02 PMURLBuilder(host = "localhost").apply {
path("%?")
parameters["?"] = "?"
}
.buildString()
.also(::println)
The above code produces <http://localhost/%25??%3F=%3F>
url. The question mark in the path is not encoded. I whould expect the following: <http://localhost/%25%3F?%3F=%3F>
. If I encode it explicitly path("%?".encodeURLPath())
the percent sign is encoded twice.Leon K
08/18/2019, 1:38 PMinstall(Auth)
in an HttpClient, the class doesn't seem to exist. also, the dependency that is installed by the wizard is compile "io.ktor:ktor-client-auth-basic:$ktor_version"
, whilst in the ktor doc (https://ktor.io/clients/http-client/features/auth.html) the mentioned dependency is "io.ktor:ktor-client-auth:$ktor_version"
... any ideas?shengyou
08/20/2019, 5:12 AMbitkid
08/20/2019, 2:35 PMbitkid
08/20/2019, 2:35 PMcall.respondTextWriter { db.query { write(rs.next())}}
but all exceptions within the respondTextWriter block should actually lead to a different http status code. what i could do is something like db.query{call.respondTextWriter {}}
but i would need something like launch{} in that code and its a bit ugly to pass the call into that function