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
  • s

    s1m0nw1

    10/24/2017, 9:12 AM
    Does anyone have an example of using ktor for a Http Client?
    m
    s
    • 3
    • 4
  • o

    orangy

    10/25/2017, 7:21 PM
    How do you think it should work? I never used several authentication layers, so I really don’t know
    h
    g
    • 3
    • 4
  • o

    orangy

    10/25/2017, 9:01 PM
    📣 we are planning another grand rename in Ktor: rename Host -> Engine. Apparently host is too ambiguous and confusing term (who knew?), so we want to fix it before API freeze. It shouldn’t influence anyone writing applications with ktor, apart may be from few package imports in a main file (with embedded server) or reference to DevHost (DevEngine)
    👍 3
    k
    • 2
    • 3
  • o

    orangy

    10/27/2017, 11:49 AM
    Please welcome new ktor.io icon 🙂 https://github.com/ktorio
    👏 16
    e
    • 2
    • 1
  • m

    miha-x64

    10/27/2017, 1:02 PM
    Hmm, I always imagined ktor as a toroid 🙂
    o
    • 2
    • 5
  • t

    triplem

    10/27/2017, 8:34 PM
    @orangy would be great if the github link is more present on the Homepage. right now, the only link (I found) is by clicking on the "star". Probably the usual ribbon?
    o
    • 2
    • 8
  • o

    orangy

    10/31/2017, 5:42 PM
    I’m really impressed (in a good way) of the fact that so many people actually read docs 😄
    v
    • 2
    • 1
  • s

    Slackbot

    11/02/2017, 5:31 PM
    This message was deleted.
    t
    m
    • 3
    • 3
  • m

    Marc Knaup

    11/03/2017, 5:48 PM
    Not sure about this one: https://blog.jooq.org/2014/09/23/asynchronous-sql-execution-with-jooq-and-java-8s-completablefuture/ It’s not free and probably even closed source.
    d
    • 2
    • 2
  • h

    Hawk

    11/03/2017, 5:49 PM
    If only that was an option 🙂
    👍 1
    d
    • 2
    • 4
  • p

    pastjean

    11/03/2017, 8:10 PM
    those annotations though 😛 would have like to ditch em. but it's all right
    t
    o
    • 3
    • 4
  • s

    Sola

    11/08/2017, 1:26 PM
    404 for me http://ktor.io/quickstart/artifacts.html from http://ktor.io/quickstart/gradle.html
    o
    • 2
    • 1
  • k

    kenkyee

    11/09/2017, 7:58 PM
    or social integration (facebook/google logins)
    o
    s
    • 3
    • 3
  • o

    orangy

    11/14/2017, 1:10 PM
    Can anyone pick up on JWT? https://github.com/ktorio/ktor/pull/188
    a
    • 2
    • 3
  • o

    orangy

    11/17/2017, 9:23 AM
    Yes, TestEngine is designed to imitate a server without actually running one, so that tests can be fast and simple. If you wish, you can look at our integration tests, where real servers are running.
    m
    • 2
    • 2
  • s

    spand

    11/17/2017, 1:42 PM
    Can I in any way pass objects into a module while using an embedded server and reloading enabled ?
    o
    • 2
    • 11
  • r

    redrield

    11/17/2017, 3:56 PM
    Alright, so I know that I can configure a default file to serve in a static block, but how can I serve a static file from the structure I've set in that static block for one request?
    o
    • 2
    • 10
  • q

    qwert_ukg

    11/20/2017, 3:51 AM
    How to config app for Tomcat ?
    c
    • 2
    • 2
  • k

    kimar

    11/20/2017, 6:30 PM
    Hey guys, what's the most elegant and safe way to enforce content-length/upload size for multipart request? I'm happy with checking this after the client has sent it's data, but I don't want to rely on the
    Content-Length
    header, what can I do to check the size of the multiparts?
    c
    • 2
    • 7
  • o

    orangy

    11/21/2017, 1:47 PM
    :yes: just use
    resource
    instead of
    file
    in static section
    m
    c
    • 3
    • 5
  • d

    dave08

    11/21/2017, 4:13 PM
    @orangy I saw those docs, but I need multiple docker images in multiple ci pipelines with some shared modules -- which could be a common setup for microservice infrastructure. Also, do you build and redeploy all the microservices for changes in any one of them or just each changed one seperately?
    o
    p
    • 3
    • 20
  • c

    cy

    11/21/2017, 5:36 PM
    Until we have complete JWT/JWKS support in ktor... https://www.scottbrady91.com/Kotlin/JSON-Web-Token-Verification-in-Ktor-using-Kotlin-and-Java-JWT
    👍 2
    s
    • 2
    • 1
  • j

    jimn

    11/22/2017, 4:14 AM
    i am looking at https://github.com/jnorthrup/ktor/blob/10a73efff92e01023d94fc0167064240c0cb8ec1/ktor-network/src/io/ktor/network/selector/Selectable.kt#L38
    c
    • 2
    • 43
  • j

    jimn

    11/24/2017, 6:00 PM
    this is more about coroutines that ktor... however i'd love to contribute the 5 years of experience hacking NIO back into Ktor where the outcome has been guaranteeing off-heap end-to-end functional constructs. I need a few nudges to get started in coroutines and refactor the NIO dispatch loops. afiact the EPOLL semantics are relatively pure and freindly to bytebuffers and there is only one scoped access to Selector
    o
    • 2
    • 1
  • j

    janvladimirmostert

    11/25/2017, 6:29 PM
    I'm curious, why did
    ktor
    go the servlet route instead of running on top of Netty ?
    j
    o
    +2
    • 5
    • 6
  • g

    gotwalt

    11/30/2017, 8:03 PM
    Anybody have an example of testing a websockets endpoint? I've got the resulting bytebuffer full of raw ws frames, but not sure how to parse and test against the results
    c
    • 2
    • 1
  • w

    wineluis

    12/01/2017, 11:12 PM
    like json parsing is external, unknown words (intercept, ContentNegotiation), unknown libs (Netty, Jetty)
    o
    h
    • 3
    • 2
  • j

    jasondlee

    12/07/2017, 3:17 PM
    i have this dep in my gradle build: compile "io.ktor:ktor-server-netty:$ktor_version". when I try to run the module (with the main class set to io.ktor.server.netty.DevelopmentEngine and the module set to the correct gradle module, I get this error:
    g
    • 2
    • 1
  • j

    jasondlee

    12/07/2017, 5:24 PM
    i don't see that option in AS 3.0.1
    g
    • 2
    • 1
  • j

    jasondlee

    12/07/2017, 7:18 PM
    hrm. no love there. i wonder if I'd have better luck with Maven
    g
    • 2
    • 16
Powered by Linen
Title
j

jasondlee

12/07/2017, 7:18 PM
hrm. no love there. i wonder if I'd have better luck with Maven
g

gildor

12/08/2017, 3:28 AM
Maybe you could create an example project that reproduces your problem.
j

jasondlee

12/11/2017, 7:05 PM
been a while, but here's the project: https://bitbucket.org/jdlee/kotlist/src
dumb/basic, but it's a learning effort 🙂
FTR, if I use IDEA, it works. with AS, it does not. lesson learned. 🙂
g

gildor

12/12/2017, 6:06 AM
Problem of you project with Gradle is wrong buildscript configuration. You overrider root buildscript in child projects. I’ve fixed it, just remove buildscript blocks from child repos. Also, better to use
plugins{}
block dsl instead of
buildscript
https://bitbucket.org/jdlee/kotlist/pull-requests/1/fixed-gradle-build/diff
This is PR with fix
actually, there is a lot of things in config that could be improved
Also, I delete
common
module, because it’s empty and doesn’t contains gradle config
Main few fixes: 1. I removed settings.gradle in
android
, you need only one settings.gradle per project, other will be ignored 2. each module can use own buildscript, but you override it in your case. Just use one in root project. But better to rewrite config to plugins dsl instead. For now I just define all buildscript dependencies in root build.gradle, without allprojects 3. You don’t need intermidiate build.gradle in
android
, build.gradle in android:app is enough, but actually now
android
contains only
app
, so you can just flatten dirrectories 4. You have a lot of duplicate repositories declarations. You can define repos for all projects at the same time in root build.gradle, or have separate one for each module 5. You don’t need kotlin-stdlib in buildscript dependencies 6. Minor thing. You can use subprojects instead of allprojects if you don’t have any code or plugins in root project (like in your case)
j

jasondlee

12/12/2017, 6:36 AM
merged the PR. thanks. 🙂
i'm not a gradle guy, so I'm cobbling things together from various sources. appreciate the clean greatly. 🙂
g

gildor

12/12/2017, 6:43 AM
Yeah, common thing 🙂 Hope that Gradle Kotlin-DSL will change it in future, because push some good gradle practices
j

jasondlee

12/12/2017, 8:23 PM
👍
got the app/demo working. presentation went well. thanks again 🙂
g

gildor

12/13/2017, 2:17 AM
Glad to help
View count: 1