Fix ofResponseProcessor signature
This commit changes the `HandlerFilterFunction.ofResponseProcessor` method signature to return `Mono<ServerResponse>`, to better cooperate with response builders (which all return a `Mono`).
This commit is contained in:
@@ -92,10 +92,10 @@ public interface HandlerFilterFunction<T extends ServerResponse, R extends Serve
|
||||
* @return the filter adaptation of the request processor
|
||||
*/
|
||||
static <T extends ServerResponse, R extends ServerResponse> HandlerFilterFunction<T, R> ofResponseProcessor(
|
||||
Function<T, R> responseProcessor) {
|
||||
Function<T, Mono<R>> responseProcessor) {
|
||||
|
||||
Assert.notNull(responseProcessor, "'responseProcessor' must not be null");
|
||||
return (request, next) -> next.handle(request).map(responseProcessor);
|
||||
return (request, next) -> next.handle(request).then(responseProcessor);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user