https://kotlinlang.org logo
Docs
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
server
  • m

    muliyul

    02/24/2021, 10:28 PM
    Hey guys does anyone know if Swagger has a Slack channel?
    :google: 4
    :kotlin-flag: 2
    c
    • 2
    • 1
  • m

    marzelwidmer

    03/01/2021, 9:40 PM
    hello is there also support for HATEOAS ON KTOR? we run at the moment the spring kotlin stack. I want try something new:)
    a
    • 2
    • 2
  • a

    Anuj Dutta

    03/05/2021, 10:22 AM
    Is this the channel to speak to devs using kotlin for webapps?
    b
    a
    • 3
    • 4
  • a

    Akshay Pawar

    03/07/2021, 4:35 AM
    Hello All I need solution I am preparing code to take profileData (ex. img, name, email, mobile) in Kotlin/Ktor I can store user POST data to mysql DB I can store single image url in mysql DB with help of receiveMultipart() method but unable to store ProfileData (ex. img, name, email, mobile) ,, text and image at a time when I am trying store image from postman with id getting me "io.ktor.features.UnsupportedMediaTypeException: Content type multipart/form-data is not supported" //I am using Ktorm to store data in MySQL DB
    e
    • 2
    • 1
  • r

    Rafał Kuźmiński

    03/08/2021, 1:40 PM
    Hello everyone. I think I have some memory leak in my Ktor based application. Tomcat is spawning many Threads and never releases them. Is there any way to hook into moment when Ktor requests new Thread? Some parts of application are working fine (I can create hundreds requests and none Tomcat thread is created). Or maybe this is bad idea and I should log all currently working threads? Or do you suggest any other way of checking this issue?
    t
    j
    • 3
    • 13
  • g

    Gopal S Akshintala

    03/10/2021, 1:52 PM
    Are there any docs/talks about how you sold Kotlin to your team for backend? I am planning to do so at Salesforce and I need a reference for my pitch. Thanks
    d
    t
    +4
    • 7
    • 44
  • e

    evanchooly

    03/12/2021, 5:24 PM
    is there a tweet for this i could retweet, @Alina Dolgikh [JB]?
    a
    • 2
    • 2
  • d

    David

    03/12/2021, 11:07 PM
    can anyone recommend me a webserver or application server, well something that I can deploy my Spring Boot project into
    r
    b
    b
    • 4
    • 5
  • d

    David

    03/12/2021, 11:08 PM
    it's just a personal project that I run on my computer but I'd like to
    maven deploy
    instead of having to manually kill the process and copying the jar into the folder
    f
    b
    • 3
    • 4
  • d

    David

    03/12/2021, 11:09 PM
    if someone knows an alternative I'm up for suggestions 🙂
    a
    a
    +2
    • 5
    • 13
  • l

    Luiz Aguiar

    03/18/2021, 10:08 PM
    hello folks 👋 given the function:
    fun <T : Any> myFunction(foo: Foo, bar: Bar, response: KClass<T>): MyResponse<T> { do magic }
    how can it be mocked to control the returned object?
    whenever(mockedClass.myFunction(any(), any(), any<SomeType>())).thenReturn(MyResponse<SomeType>())
    I tried few variations with mockito/mokk but the argument matcher never works.
    j
    j
    • 3
    • 3
  • m

    Manuel Pérez Alcolea

    03/20/2021, 4:02 PM
    Web dev rookie here, I don't quite understand the common abstractions for servers in the Java world. I sort of understand the concept of servlets, but checking the documentation for Ktor I've read that Ktor can run on a servlet container, like Tomcat. Does that mean Ktor is a servlet itself? Or that implements the servlet interface somewhere, so it can run on Tomcat?
    k
    r
    • 3
    • 6
  • s

    Slackbot

    03/21/2021, 1:31 AM
    This message was deleted.
    l
    j
    • 3
    • 2
  • b

    Byron Katz

    03/25/2021, 7:43 PM
    Just to see what's possible, we've been developing a web application basically from scratch, with the only dependencies being the standard libraries. It's developed using strict TDD, and uses the gradle build tool. Check it out here: https://github.com/7ep/r3z Would love to get your feedback.
    ➕ 1
    a
    r
    +3
    • 6
    • 71
  • s

    scott

    03/26/2021, 10:01 PM
    I am implementing an event driven system where a consumer may need to process 1 to many event ReceiverChannels. First time I have had a use case for something like this, so I was looking for feedback if this was the right way to do it or if Kotlin already has a construct for "funneling" channels into a single receiver:
    a
    • 2
    • 4
  • p

    Pavel Petkevich

    03/30/2021, 10:33 PM
    Hello to all, I have a question would someone from you here is experienced to make a cron job in server-side KTOR application? PS> I have few possible solutions, but one of the best which I have currently in my mind is to schedule some job using Coroutines. Thanks in advance for any kind of answers 🚀
    a
    • 2
    • 21
  • g

    Guilherme Delgado

    03/31/2021, 12:20 AM
    Hello! Can I have this configuration (JsonFeature, serializersModule):
    private fun createHttpClient(enableNetworkLogs: Boolean) = HttpClient {
        install(JsonFeature) {
            serializer = KotlinxSerializer(kotlinx.serialization.json.Json {
                isLenient = true
                ignoreUnknownKeys = true
                serializersModule = SerializersModule { contextual(MyCustomSerializer) }
            })
        }
        if (enableNetworkLogs) {
            install(Logging) {
                logger = Logger.DEFAULT
                level = LogLevel.ALL
            }
        }
    }
    Applied only to a specific request (without creating a different client)
    suspend fun fetchData(): List<Something> = client.<configure specific serializersModule for this request>.get(...)
    ? Thanks for your time! ps: this is my ktor configuration for KMM commonModule. Maybe the question is in the wrong channel 😕 sorry in advance
    r
    • 2
    • 2
  • g

    Guilherme Delgado

    03/31/2021, 10:32 AM
    just quick follow up on my question. I’ve tried to override client features but i couldn’t, and I couldn’t also have 2 JsonFeature
    t
    • 2
    • 2
  • j

    Justin Tullgren

    03/31/2021, 10:46 PM
    Hi, any reason ktor would return 404 and never hit a registered route using netty and running from intellij? routes and app in thread
    🙌 1
    b
    j
    • 3
    • 7
  • s

    Slackbot

    04/03/2021, 8:04 PM
    This message was deleted.
    🚨 7
    🚔 7
    👎 20
    b
    j
    +7
    • 10
    • 22
  • t

    Tarun Chawla

    04/22/2021, 4:31 PM
    install(CORS) {
      method(HttpMethod.Options)
      method(HttpMethod.Get)
      method(<http://HttpMethod.Post|HttpMethod.Post>)
      method(HttpMethod.Put)
      method(HttpMethod.Delete)
      method(HttpMethod.Patch)
      header(HttpHeaders.AccessControlAllowHeaders)
      header(HttpHeaders.ContentType)
      header(HttpHeaders.Authorization)
      header(HttpHeaders.AccessControlAllowOrigin)
      allowCredentials = true
      anyHost()
    }
    I have setup CORS but I still get this error on firefox browser, can someone please help?
    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource
    a
    • 2
    • 2
  • j

    Justin Tullgren

    04/22/2021, 6:10 PM
    Hi, does anyone know how to register a kotlinx serialization SerializersModule with kmongo couroutines? I am using the
    org.litote.kmongo:kmongo-coroutine-serialization
    library but I cant see how to set the serializer module for a polymorphic type
    • 1
    • 1
  • h

    Hasan Hosgel (alosdev)

    04/27/2021, 12:41 PM
    hi all, I’m using a Spring webflux application with Kotlinx serialization. unfortunately, the swagger generation doesn’t work as expected, because the overridden name with the annotation with
    SerialName
    doesn’t get recognized and setting the name with
    ApiModelProperty
    has no effect. has any one some hints how to solve this problem?
    n
    • 2
    • 1
  • j

    Joram Visser

    04/30/2021, 7:57 AM
    I've been playing around with MyBatis and came in touch with what I can only describe as dark magic. When inserting a data class domain model in the database, the instance that was passed to the insert function is "updated" after a successful insert with the auto generated id. How is this possible when the instance is declared as val and is a data class with only vals as properties?
    😂 1
    :magic_wand: 1
    e
    d
    c
    • 4
    • 52
  • h

    Husam

    05/02/2021, 11:00 PM
    Anybody else face issues with #jacoco branch coverage when upgrading kotlin? Blocked from upgrading from 1.3.72 to 1.4+ because a lot of new 'ghost' branches pop up as uncovered. Some might be addressed in the next jacoco release based on the release notes, but it's been one of the few impactful pain points I've had with kotlin. Unfortunately been blocked from upgrading for months on this, curious if there's a plan to address this better going fwd?
    b
    n
    c
    • 4
    • 30
  • r

    Roukanken

    05/03/2021, 2:06 PM
    Hello, I've been searching for a while, but can't really find anything... Is there any good framework/ORM/ or w/e for Kotlin, that can interact with SQL databases in a non-blocking way? I've seen KMongo, but you can guess from name that's only for MongoDB, everything else I found is blocking, even if it has some coroutines support
    c
    h
    • 3
    • 5
  • t

    timmy

    05/05/2021, 7:05 AM
    Hi everybody, can someone please point me to the direction of setting up Ktor with mongodb?
    b
    • 2
    • 2
  • j

    João Rodrigues

    05/06/2021, 8:44 AM
    Hey guys 👋 I'm evaluating server side technologies for a new backend, we're leaning towards ktor. One hot topic is that we're probably going to have to return large responses, in json format. What is the usual procedure to do so? Does ktor have a standard way to do this? Also, if you had success with this with any other server side frameworks, let me know! Thanks
    a
    b
    +4
    • 7
    • 23
  • c

    ck

    05/06/2021, 8:52 PM
    Hey everyone, I just launched my first Ktor based backend in a production environment and am currently looking for a way to run periodic jobs (e.g. once an hour) to do some data processing, which takes 5mins max. How would you solve this, ideally without going the route of using something like a job queue service?
    o
    b
    +2
    • 5
    • 6
  • s

    Slackbot

    05/07/2021, 7:36 AM
    This message was deleted.
    :not-kotlin: 1
    n
    • 2
    • 1
Powered by Linen
Title
s

Slackbot

05/07/2021, 7:36 AM
This message was deleted.
:not-kotlin: 1
n

nfrankel

05/07/2021, 8:16 AM
#ktor
View count: 2