https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
ktor
  • m

    mp

    05/23/2018, 8:36 PM
    Unfortunately, that doesn't work -- when I set an interceptor on a phase in the Application's Pipeline, that executes before the Route-specific Pipeline. Is there a different way I should be applying defaults to the Application's Pipeline?
    d
    • 2
    • 10
  • o

    otakusenpai

    05/24/2018, 11:18 AM
    import io.ktor.network.tls.* is giving me unresolved reference
    d
    • 2
    • 16
  • b

    brabo-hi

    05/25/2018, 10:48 PM
    i can't get call.request.queryParameters[Users.name1.name] ???
    d
    • 2
    • 5
  • o

    otakusenpai

    05/27/2018, 12:38 PM
    https://github.com/OtakuSenpai/AghoraBot/blob/master/src/main/kotlin/com/otakusenpai/aghora/connection/BasicConnection.kt#L103 This function call fails for a certain message due to null being sent by the server. How can I navigate the null being given out and return a normal "" or empty string ans the return parameter?
    h
    d
    • 3
    • 3
  • h

    Hamza

    05/27/2018, 3:10 PM
    anyone know of a ktor tutorial type page, where it teaches me how to use ktor, and making example apps step-by-step so I can learn? Kinda hard from me to learn with the current setup. Unless im misisng omsetihng
    z
    r
    +2
    • 5
    • 12
  • h

    Hamza

    05/28/2018, 12:50 PM
    Just created some basic html, and was wondering, how do I implement css with it? Haven’t found much on it, so I’m like really confused.
    g
    d
    • 3
    • 6
  • d

    Deactivated User

    05/29/2018, 10:13 AM
    ^ @aeruhxi
    • 1
    • 5
  • m

    mkporwit

    05/29/2018, 11:21 PM
    Is there a feature that enables OpenID logins in ktor? We’re looking at leveraging Azure AD… I assume I can just configure OAuth2.0 to do the right thing?
    d
    • 2
    • 3
  • h

    Hamza

    05/30/2018, 8:55 AM
    hi, i just created a form with html, relatively simple. any way i can then connect the form submission to kotlin code?
    d
    • 2
    • 2
  • v

    v

    05/30/2018, 12:38 PM
    Is there any difference between
    embeddedServer
    and
    DevelopmentEngine
    , other than how they're configured and started?
    d
    • 2
    • 6
  • n

    Nikola

    05/30/2018, 1:01 PM
    call.receive<List<User>>() throws cannot cast exception when accessing elements. The solution is to wrap the list inside an object and call like this: call.receive<Users>() But what if I need array to be the root of the JSON? What can I do? P.S. I'm using gson.
    d
    m
    • 3
    • 12
  • m

    mkporwit

    05/30/2018, 9:35 PM
    Is
    io.ktor.jetty.DevelopmentHost
    no longer a thing? I can’t find it under either
    ktor.jetty
    or
    ktor.server.jetty
    d
    • 2
    • 3
  • f

    feng-zihao

    05/31/2018, 8:22 AM
    I found the followings:
    val ApplicationStarting = EventDefinition<Application>()
    val ApplicationStarted = EventDefinition<Application>()
    val ApplicationStopPreparing = EventDefinition<ApplicationEnvironment>()
    val ApplicationStopping = EventDefinition<Application>()
    val ApplicationStopped = EventDefinition<Application>()
    s
    • 2
    • 2
  • f

    feng-zihao

    05/31/2018, 8:23 AM
    But how to use them? I can't find some demo code. Somebody give a hint ? Thanks.
    📝 1
    ✅ 1
    d
    • 2
    • 3
  • s

    spand

    05/31/2018, 8:54 AM
    Anyone looked into using socketio on ktor ?
    d
    m
    • 3
    • 7
  • h

    Hamza

    05/31/2018, 1:19 PM
    Hey everyone! After I do some operations, it there a way to redirect a user to another page?
    d
    • 2
    • 18
  • d

    Deactivated User

    06/01/2018, 6:04 AM
    ^oauth2/openid
    m
    • 2
    • 64
  • h

    Hamza

    06/01/2018, 10:34 AM
    Would it be a better idea to use JavaScript, or route a user to some page, and then reroute them to another page and add some args, etc to update the page? Speed doesn't matter
    d
    m
    • 3
    • 15
  • c

    coder82

    06/02/2018, 10:23 AM
    otherwise i'll do it manually listing files and looping with html dsl, but if there is a solution already I don't want to reinvent
    d
    • 2
    • 1
  • m

    mantono

    06/04/2018, 9:23 PM
    Never mind. Literally two seconds after I wrote that I read
    This feature is defined in the class io.ktor.auth.Authentication in the artifact io.ktor:ktor-auth:$ktor_version.
    d
    • 2
    • 1
  • m

    mkporwit

    06/05/2018, 1:19 AM
    Here’s my loginProvider definition:
    OAuthServerSettings.OAuth2ServerSettings(
                    // configUrl = <https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration>
                    name = "AzureAD",
                    authorizeUrl = "<https://login.microsoftonline.com/common/oauth2/v2.0/authorize>",
                    accessTokenUrl = "<https://login.microsoftonline.com/common/oauth2/v2.0/token>",
                    clientId = "***",
                    clientSecret = "***",
                    defaultScopes = listOf("openid", "email", "profile", "offline_access"),
                    requestMethod = <http://HttpMethod.Post|HttpMethod.Post>
            )
    Otherwise, I’m using the sample OAuth2 code that ktor provides.
    d
    • 2
    • 2
  • c

    coder82

    06/06/2018, 8:07 AM
    when I am testing the websocket and i call handleWebSocketConversation waiting for incoming data, it looks like all the other url listeners don't respond
    d
    • 2
    • 1
  • n

    Nikola

    06/06/2018, 11:55 AM
    So happy to see project generator http://ktor.io/quickstart/quickstart/generator.html It would be nice if it configures default gradle wrapper. 🙂
    ✅ 1
    📝 1
    👍 2
    🙂 1
    d
    • 2
    • 7
  • s

    spand

    06/06/2018, 1:03 PM
    Has anyone done performance comparison of the websockets part of ktor ? ie. various engines and versus other frameworks ?
    o
    • 2
    • 2
  • m

    mkporwit

    06/06/2018, 11:21 PM
    Can you guys bump the version of
    com.auth0:jwks-rsa
    that you pull in for
    ktor-auth-jwt
    from 0.3.0 to 0.4.0 please? It includes a JwkProviderBuilder that takes a URL for non-auth0-standard JWKS file locations. Microsoft keeps theirs at https://login.microsoftonline.com/common/discovery/v2.0/keys, and passing that in as a string was not being handled correctly by UrlJwkProvider. Thanks!
    d
    • 2
    • 1
  • m

    mkporwit

    06/07/2018, 3:01 PM
    @Deactivated User thanks for opening that PR to update jwks-rsa. Can you also take a look at Issue #434 (and PR 435, that’s a proposed fix)?
    d
    • 2
    • 3
  • c

    coder82

    06/08/2018, 1:09 PM
    the ktor httpclient fails when used concurrently, returns an incorrect response looks like, really strange
    d
    e
    • 3
    • 109
  • c

    coder82

    06/08/2018, 5:02 PM
    unfortunately i must hold a lot of connections open due to old client which cannot be rewritten
    d
    • 2
    • 4
  • a

    avolkmann

    06/09/2018, 1:43 PM
    I switched to Jetty beacuse Netty was causing some problems. But recently I have been experimenting with CIO
    o
    • 2
    • 4
  • o

    orangy

    06/09/2018, 2:12 PM
    I wonder if anyone still willing to implement Undertow engine…
    c
    d
    • 3
    • 10
Powered by Linen
Title
o

orangy

06/09/2018, 2:12 PM
I wonder if anyone still willing to implement Undertow engine…
c

christophsturm

06/10/2018, 4:08 PM
i have used undertow a lot in the past so i could look into that if we end up using ktor
o

orangy

06/10/2018, 5:10 PM
Even if you don’t, it still could be fun! 😉
c

christophsturm

06/10/2018, 5:51 PM
you mentioned that there is some undertow work in a branch?
o

orangy

06/10/2018, 6:26 PM
yeah, but it is waaay outdated…
no way you can rebase it or something… only if copy pasting some code
but since a lot of stuff is now implemented without a requirement to bridge to the engine, it should be easier these days
c

christophsturm

06/11/2018, 6:59 AM
ok
o

orangy

06/13/2018, 1:26 PM
@christophsturm https://ktor.io/advanced/engines.html if you want to get started, and then we can answer your questions and improve docs (cc @Deactivated User)
👍 1
c

christophsturm

06/13/2018, 1:26 PM
thanks will take a look
d

Deactivated User

06/13/2018, 1:42 PM
if you have any issues with the documentation ping me and will help you/update it to make it clearer
View count: 4