Hello and thanks for the great work. I am heavily using Spring Boot Webflux together with Kotlin and Coroutines. I wanted to ask, if it is planned to introduce a Coroutine aware Webclient and a suspending Webfilter. So instead of using

override fun filter(exchange: ServerWebExchange, chain: GatewayFilterChain): Mono<Void> to be able to use something like the following:

override suspend fun filter(exchange: ServerWebExchange, chain: GatewayFilterChain)

I think having to use Reactor in some places and Coroutines in others does not allow for a consistent coding patterns for Spring Boot Kotlin users.

Comment From: sdeleuze

I agree that would be cleaner from a Kotlin perspective to be able to use only suspending function there. If we introduce a CoWebFilter Coroutines variant, we also need to introduce a CoWebFilterChain one.

@poutsma @rstoyanchev Any thoughts?

Comment From: bragovo

Hi, it's works find but is it possible to use contextWrite in CoWebFilterChain? I can't find a way to do that -(

Comment From: sdeleuze

If you are leveraging Coroutines, can you use Coroutines context instead for your use case?