Skip to content

Support suspending functions returning Flow #22820

Closed
@sdeleuze

Description

@sdeleuze

WebFlux Coroutines support does not handle correctly suspending functions that returns Coroutines Flow which is a valid use case when for example using WebClient "2 stage" API.

@GetMapping("/flow-via-webclient")
suspend fun flowViaWebClient() =
		client.get()
			.uri("/flow")
			.accept(MediaType.APPLICATION_JSON)
			.awaitExchange()
			.bodyToFlow<Banner>()

This use case is valid and should be supported.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions