fun contentType(mediaType: MediaType, f: (ServerRequest) -> Mono<out ServerResponse>): Unit
Route to the given handler function if the given contentType predicate applies.
See Also
fun contentType(mediaType: MediaType): RequestPredicate
Return a {@code RequestPredicate} that tests if the request's {@linkplain ServerRequest.Headers#contentType() content type} is {@linkplain MediaType#includes(MediaType) included} by any of the given media types.
mediaTypes
- the media types to match the request's content type against
Return
a predicate that tests the request's content type against the given media types