kenkyee
01/18/2018, 9:23 PMribesg
01/18/2018, 9:32 PMribesg
01/18/2018, 9:32 PMribesg
01/18/2018, 9:32 PMribesg
01/18/2018, 9:32 PMribesg
01/18/2018, 9:33 PMavolkmann
01/19/2018, 12:06 PMribesg
01/19/2018, 4:22 PMwouterdoeland
01/19/2018, 4:55 PMUnsupportedMediaTypeException: Content type */* is not supported
for this test (and probably all others as well)
with(handleRequest(<http://HttpMethod.Post|HttpMethod.Post>, path)) {
assertEquals(HttpStatusCode.BadRequest, response.status())
}
cy
01/19/2018, 4:56 PMneworldlt
01/19/2018, 5:19 PMLocations
on big project increases messiness. It is a bit hard map API endpoints with logic calls because they both are in different code places. On another hand, I like them, because they map params with object. Do you consider to have something like that:
data class SearchRequest(q: String)
// a lot of code
route(“/api”) {
get<SearchRequest>(“/search”) {
//oneline call
}
}
orangy
Locations
are designed so that they keep both information about path and parameters. You can create an URL from data class instance, and that’s not possible without information about a path mapping.noncom
01/19/2018, 8:52 PMwebSocket("/some/address")
clause, the websocket is closed with the OK
codenoncom
01/19/2018, 8:53 PMnoncom
01/19/2018, 8:53 PMmiha-x64
01/20/2018, 12:18 AMcall.response.status()
is already set?
I've found many phases declared, but seems like they're local and not visible from Route
where I'm trying to set interceptor.miha-x64
01/20/2018, 1:26 AMxxxifan
01/20/2018, 4:51 AMxxxifan
01/20/2018, 5:06 AMorangy
proceed
in a pipeline to effectively wrap the call. So if you install interceptor in the beginning of a pipeline, call proceed
and after that the call is already being completedmiha-x64
01/20/2018, 11:43 AMproceed()
should return result of a call.
Relying on state mutation (e. g. on fact that statusCode becomes non-null) introduces procedural temporal coupling.orangy
miha-x64
01/20/2018, 1:23 PMorangy
damian
01/20/2018, 10:08 PMPOST
request (JSON, i have GSON in ContentNegotiation
) like this: val post = call.receiveParameters()
and i'm getting java.lang.RuntimeException: Unable to invoke no-args constructor for interface io.ktor.util.ValuesMap. Register an InstanceCreator with Gson for this type may fix this problem.
damian
01/20/2018, 10:08 PMdamian
01/20/2018, 10:13 PMcall.receive<ValuesMap>()
returns the same exception)damian
01/20/2018, 10:24 PMdata class
for the received object it's working.. but all the examples (kweet for example) are using ValuesMap
, so thats kind of weird.kristofdho
01/20/2018, 10:45 PMfrellan
01/21/2018, 7:02 AMcall.receive<JsonObject>
to use Gson, had trouble with that myself