Antero Duarte
09/06/2018, 4:24 PMjw
09/06/2018, 4:57 PMsamir
09/07/2018, 7:58 PMcall.receiveText()
but it is always empty. I am using version 0.9.4. I saw on the following post on stackoverflow that it was a known issue fixed in v0.9.2. Anyone knows if it is still an issue in the latest version ?
https://stackoverflow.com/questions/49895169/ktor-unable-to-receive-post-body-on-serverSemigradsky
09/09/2018, 10:15 AMMultiPartFormDataContent
?Nikky
09/10/2018, 9:53 AMNikky
09/10/2018, 10:34 AMNikky
09/10/2018, 4:54 PMNikky
09/11/2018, 8:06 AMNikky
09/11/2018, 12:52 PMexpectedBy project(':ktor-client:ktor-client-features:ktor-client-json')
Janez Štupar
09/11/2018, 2:07 PMNikky
09/11/2018, 5:53 PMNikky
09/11/2018, 9:11 PMexpect fun serializerOf(typeInfo: TypeInfo): KSerializer<Any>
to move al lthe jvm specific cruft away.. but i am not sure if that would be considered a good idearharter
09/12/2018, 3:16 AMNikky
09/12/2018, 10:00 AMgildor
09/12/2018, 10:28 AMdave08
09/13/2018, 12:22 PMdave08
09/16/2018, 3:26 PMval kodein = Kodein.direct {
.....
}
fun Routing.someController(
someRepository: SomeRepository
) { ... }
fun Application.module() {
routing {
someController(kodein.instance())
}
}
But I want to be able to access the kodein
instance inside the Application.module()
in a way that I can replace it in my tests... @Deactivated User?spand
09/17/2018, 12:34 PMGsonSerializer.read
casts deserialized json to Any
? And not Any?
?dave08
09/17/2018, 7:51 PMgildor
09/18/2018, 7:34 AMbdawg.io
09/18/2018, 7:58 PMcy
09/19/2018, 10:26 AM0.9.5
and 0.9.6-alpha-1-rc13
has been released. They have the same features but the second is built with Kotlin 1.3 RC.
* Added shorthand client functions for HEAD, OPTIONS, PATCH and DELETE methods (#562)
* URLBuilder's parser improved (#553, #567)
* Improved client's cookie matching and processing
* Introduced CallId feature
* Added MDC support to CallLogging feature
* Fixed setting charset encoding for non-text content types
* Added respondOutputStream { }
response function
* Migrated to Kotlin 1.2.70
* Split Infrastructure phase into Monitoring and Features phases
Migration guide
https://ktor.io/quickstart/migration/0.9.5.htmlorangy
09/19/2018, 10:35 AMCallId
feature. If you have a homebrew version of such a feature, or would like to try it, please tell us how it works and if it suites your needs. That’s the last feature before we go towards 1.0 and start fixing only bugs and biggest pain points.christophsturm
09/19/2018, 11:08 AMCould not find io.ktor.client:ktor-client-redis:0.2.0
, and indeed there seems to be no version 0.2.0 of thatNikky
09/19/2018, 1:02 PMNikky
09/19/2018, 1:30 PM<http://client.post|client.post><List<Users>>(...)
mwudka
09/20/2018, 9:20 PMNettyChannelInitializer
uses the familiar SslContextBuilder
from Netty. I think that calling clientAuth
and trustManager
on the SslContextBuilder
instance would do what I want. My problem is that I can't see how to pass settings into my engine config to make NettyChannelInitializer
do what I want. Any ideas? Or is this not possible in the current version of ktor, and I should use nginx as a reverse proxy?oshai
09/20/2018, 11:33 PMgildor
09/21/2018, 7:39 AMAlexander Vasiljev
09/21/2018, 8:24 AMAlexander Vasiljev
09/21/2018, 8:24 AMDeactivated User
09/21/2018, 8:25 AMAlexander Vasiljev
09/21/2018, 8:29 AM@Location("/products")
class Products
@Location("/platforms")
class Platforms
@Location("/deviceModels")
class DeviceModels
a(href = "/products") { +"Products" }
one is able to a(href = href(Products())) { +"Products" }
-- the feature is great!href(Products())
) inside the template. Corresponding function href
is available only in Routing context. For now I am using the trick:
var href: (Any) -> String = { "" }
fun Routing.commonRoutes() {
href = fun(location: Any): String { return application.locations.href(location) }
// etc.
and wonder if more elegant solution might exist?Deactivated User
09/21/2018, 8:57 AMTemplate
subclass with a call: ApplicationCall
, and make a href method or extension method for that class that calls the right method with the right contextAlexander Vasiljev
09/21/2018, 10:21 AMfun Routing.productRoutes() {
get<Products> { _ ->
call.respondHtmlTemplate(
ListTemplate(
title = "All products",
tableModel = allProductTableModel(),
href = fun(location: Any) = this@productRoutes.application.locations.href(location)
)
) {}
}
}
same code for every get or postfun Routing.productRoutes() {
get<Products> { _ ->
call.respondHtmlTemplate(
ListTemplate(title = "All products", tableModel = allProductTableModel())
) {}
}
}
orangy
09/21/2018, 10:34 AMLocations
is a feature that needs much more attention, but unfortunately right now we don’t have enough resource. It’s not about coding, more about designing it better.Location
feature instance, so it shouldn’t be too hard?Application
instance and use it everywhere.Alexander Vasiljev
09/21/2018, 10:40 AMorangy
09/21/2018, 10:41 AMDeactivated User
09/21/2018, 10:43 AMcoroutineContext
as a dependency container 🤨, like a scala implicit. Though I wouldn’t do that either
the main problem with globals (in addition to multithreading issues) is testing or multiple applications, you normally want to start things from scratch. Even when in control at the beginning, it is a bad practice in generalAlexander Vasiljev
09/21/2018, 10:43 AMIt’s not about coding, more about designing it better.So I provided you with feedback from a real world application. Anyway, thank you for a wonderful framework.
orangy
09/21/2018, 10:47 AMAlexander Vasiljev
09/21/2018, 10:49 AMor Location instanceI do not see that Location instance would be of any use though. E.g. there are actually @Location("/products") class Products { @Location("/{id}") class Item(val id: Int) } and later:
private fun ProductModel.asRowModel(): RowModel {
return RowModel(listOf(RefCell(id) { href(Products.Item(id)) }, PlainCell(name)))
}
It is possible to embed links into list view. Each to corresponding item: href(Products.Item(id))
for every item in the listorangy
09/21/2018, 10:51 AMLocations
feature instance, like application.locations
Alexander Vasiljev
09/21/2018, 10:51 AMDeactivated User
09/21/2018, 10:54 AMAlexander Vasiljev
09/21/2018, 11:31 AM