Marcel Dohnal
09/02/2019, 3:13 PMDarmaheev
09/03/2019, 6:32 AMval httpClient = HttpClient()
GlobalScope.launch(ApplicationDispatcher) {
try {
val url = servUrl
val json = httpClient.get<String>{
header("Authorization", "Bearer " + Token.getAccessToken())
url(url)
}
success(json)
} catch (ex: Exception){
failure(ex)
}
I would really appreciate any advice. I’m new at ktor and kotlincy
09/03/2019, 7:57 AM1.2.4
has been released
* Fixed multipart form header entity separator
* Fixed crypto in IE11 (#1283)
* Marked response transient in the client exception (#1256)
* Fixed network on main thread in okhttp engine close
* Fixed follow redirect iOS (#1000)
* Kotlin 1.3.50
* kotlinx.coroutines 1.3.0
Notice: Kotlin 1.3.50 is required to work properly with Kotlin Native
JVM: at least kotlin 1.3.41 is required, 1.3.50+ is recommended.
https://ktor.io/quickstart/migration/1.2.4.htmlTony Blundell
09/03/2019, 3:07 PMJonas Bark
09/03/2019, 7:48 PMtypeof
function, would it now be possible to update KotlinxSerializer to automatically fetch the serializer?
So we could get rid of mapping every used serializer for a classMatthew Browning
09/04/2019, 12:21 AMbram93
09/04/2019, 11:02 AMDavid Glasser
09/04/2019, 5:12 PMcoder82
09/05/2019, 7:50 AMMarcin Wisniowski
09/05/2019, 9:15 AMbitkid
09/05/2019, 10:01 PMlegzo
09/06/2019, 1:27 PMSabeeh
09/06/2019, 2:36 PM2019-09-09 00:00:00
is there any way to exclude time when data type is Datealtavir
09/09/2019, 7:21 AMInputStreamAsInput
. Current implementation seems to be bugged:
1) if I work with dynamic stream like the one I get from socket, it won't work since if input is empty, the input terminates. The input could be empty now, but not empty in the next moment. As a result I can't reliably convert socket input into Input
2) It uses internal ByteArray
pool and external IOBuffer
pool, but sizes of those buffers are not synchronized. If someone would use non-default IOBuffer
, It will probably break things.bitkid
09/09/2019, 8:07 AMSabeeh
09/09/2019, 9:39 AMDamian Lall
09/09/2019, 2:22 PMget
handler inside an authenticate
block, I'll be prompted for credentials when I try to access the route, so once the get
handler starts being executed, I can access the UserIdPrincipal
and start finding data associated with the account. However, I now want to expand my authenticate
block to include multiple routes, so I thought I could handle the initial processing of the principal/account inside an intercept
block. Yet, when I try to do this, I am not prompted for my credentials and therefore the UserIdPrincipal
inside the interceptor is null. How can I get Ktor to prompt me for my credentials from within a route interceptor inside an authenticate
block?Vinicius Carvalho
09/10/2019, 2:24 AMgetRequestUrl + getQueryString
, I know how to obtain the path of a given route
, and the query string, it's also possible to find the host
, but I could not find a way to determine the full original request as in <scheme://host:<port>/path?query>
Is it possible (even without port for now, at least scheme would be nice to have)snackycracky
09/10/2019, 9:55 AMVinicius Carvalho
09/10/2019, 1:55 PMpipeline.insertPhaseBefore(ApplicationCallPipeline.Monitoring, phase)
and pipeline.sendPipeline.insertPhaseAfter(ApplicationSendPipeline.After, postSendPhase)
specifically. Now, when I access the ApplicationCall
request
and response
is there a way to find the content-length of each? Sorry but it was not clear via the base classes how one would access that information. Thank youVinicius Carvalho
09/10/2019, 5:39 PMoverride fun put(carrier: ApplicationRequest?, key: String?, value: String?) {
}
Kroppeb
09/10/2019, 8:37 PMHttpClient
but it's unable to find the reference. If I start typeing import io.ktor.client
it can't find it either.cy
09/11/2019, 11:29 AM1.3.0-beta-1
has been published
* ktor client proxy support
* Eliminated kotlinx.io dependency
* Fixed server identity compression handling: keep original content length
* Fixed handling GET requests with body (#1302)
* Fixed curl request with empty body
* Added iOS url session configuration
* Fixed CIO engine no longer sends port in "Host" header (#1295)
* Add INTRINSIC value to TLS signature algorithms
* Introduced ability to send string in request body
* Improved client and server typeOf support with kotlinx.serialization
* Gradle 5.4.1+ with newer metadata
* Improved exceptions handling in client and server on Android
* Added missing TLS parameters and relaxed TLS parsing to ignore unsupported features
Breaking changes:
- <http://kotlinx.io|kotlinx.io>
dependency has been removed, replace imports:
- import kotlinx.io.
-> import io.ktor.utils.io.
- import kotlinx.coroutines.io.
-> import io.ktor.utils.io.
Fail
09/11/2019, 12:18 PMval result = <http://client.post|client.post><HttpResponse>("<http://127.0.0.1:$port/handler>") {
body = MultiPartContent.build {
add("user", "myuser")
add("password", "password")
add("file", byteArrayOf(1, 2, 3, 4), filename = "binary.bin")
}
}
But what will doing if file is big? ByteArraySize could not be more than free RAM. How to send file from IOS and Android to multiplatform without out of memory errors?Sam Garfinkel
09/11/2019, 1:52 PMspand
09/12/2019, 7:13 AMMarcin Wisniowski
09/14/2019, 11:51 PM1.3.0-beta-1
release from gradle? It isn't published on maven central or jcenter yet but I need the ktor client proxy support. Is there another repo I can add to my gradle file that has it?bitkid
09/15/2019, 7:09 PMManuel Lorenzo
09/16/2019, 1:42 PMSam
09/16/2019, 2:41 PMKtor
and kotless
(`https://github.com/JetBrains/kotless`)
So why JetBrains build 2 framework at the same time Ktor and Kotless ? Any pros and cons for these framework?
ThanksSam
09/16/2019, 2:41 PMKtor
and kotless
(`https://github.com/JetBrains/kotless`)
So why JetBrains build 2 framework at the same time Ktor and Kotless ? Any pros and cons for these framework?
ThanksZach Klippenstein (he/him) [MOD]
09/16/2019, 2:45 PMSam
09/16/2019, 2:47 PMAWS lambda functions
and server framework?
Thanks @Zach Klippenstein (he/him) [MOD]Zach Klippenstein (he/him) [MOD]
09/16/2019, 3:35 PMTanVD
10/07/2019, 2:41 PM