reik.schatz
03/11/2019, 10:01 AMsdeleuze
03/15/2019, 5:36 PMrrader
03/18/2019, 1:34 PM@Valid
to these properties, is it possible somehow to configure Spring to do this by default for every nested property?sdeleuze
03/28/2019, 8:12 AMServerRequest.awaitBody
and ServerRequest.awaitBodyOrNull
https://github.com/spring-projects/spring-fu/issues/197 ?sdeleuze
03/28/2019, 8:12 AMsdeleuze
03/28/2019, 8:12 AMsdeleuze
03/28/2019, 8:13 AMServerRequest.awaitPrincipal(): Principal
to ServerRequest.awaitPrincipal(): Principal?
sdeleuze
03/28/2019, 8:13 AMOrNull
only if there is multiple variants to differentiate)sdeleuze
03/28/2019, 8:27 AMClientResponse.awaitBody()
-> ClientResponse.awaitBody()
and ClientResponse.awaitBodyOrNull()
Jonas Bark
03/28/2019, 8:29 AMsdeleuze
03/28/2019, 8:35 AMWebClient
I have made an exception to the pattern I use (await
prefix or AndAwait
suffix), I have translated fun exchange(): Mono<ClientResponse>
to suspend fun awaitResponse(): ClientResponse
instead of suspend fun exchangeAndAwait(): ClientResponse
. Any thoughts?sdeleuze
03/28/2019, 8:36 AMexchangeAndAwait
not very nice, so I chose awaitResponse
for nowsdeleuze
03/28/2019, 8:36 AMsdeleuze
03/28/2019, 8:36 AMsuspend fun awaitResponse(): ClientResponse
more idiomaticsdeleuze
03/28/2019, 8:36 AMJonas Bark
03/28/2019, 8:41 AMawait...
. But translating exchange to awaitResponse
feels odd - why not awaitExchange
?sdeleuze
03/28/2019, 8:42 AMfun awaitSomething()
is usually used when the return type is Something
, when there is an operation that returns another type I use AndAwait
suffix to avoid confusion.sdeleuze
03/28/2019, 8:43 AMsdeleuze
03/28/2019, 8:43 AMawaitBody
returns the body asychronouslysdeleuze
03/28/2019, 8:43 AMsdeleuze
03/28/2019, 8:44 AMexchangeAndAwait
sdeleuze
03/28/2019, 8:44 AMsdeleuze
03/28/2019, 8:46 AMServerResponse.BodyBuilder.bodyAndAwait
sdeleuze
03/28/2019, 8:46 AMsdeleuze
03/28/2019, 8:46 AMsdeleuze
03/28/2019, 8:46 AMsdeleuze
03/28/2019, 8:47 AMServerResponse.BodyBuilder.bodyAndAwait
I am 100% sure awaitBody
is wrong since we set the body then awaitsdeleuze
03/28/2019, 8:48 AMfun exchange(): Mono<ClientResponse>
this is less clearsdeleuze
03/28/2019, 8:48 AMawaitExchange
could be fine after allsdeleuze
03/28/2019, 8:50 AMsuspend fun awaitExchange(): ClientReponse
API