HandlerFunction
returns ServerResponse
which supports providing a Publisher
or CompletableFuture
for the body but there is no way to determine the response status and headers asynchronously like there is in WebFlux where the return value is Mono<ServerResponse
.
A specific case in point is a GraphQL over HTTP endpoint for which headers of the response may need to be customized after async query execution, but the same argument applies for any case where the response status and headers may only be decided after some async operation.