Interface SuccessHttpMapper<V>

Type Parameters:
V - the success value type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@NullMarked @FunctionalInterface public interface SuccessHttpMapper<V>
Maps a success value of type V to an HTTP ServerResponse.

Supplied to the success-customizing overloads of WebfluxFun so the Ok / Some / Success / Valid branch can control the status, headers, and body — for example 201 Created with a Location header on a POST — instead of the default 200 OK with the value as the body.

  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Mono<org.springframework.web.reactive.function.server.ServerResponse>
    apply(V value)
    Renders the given success value as an HTTP response.
  • Method Details

    • apply

      reactor.core.publisher.Mono<org.springframework.web.reactive.function.server.ServerResponse> apply(V value)
      Renders the given success value as an HTTP response.
      Parameters:
      value - the success value
      Returns:
      the response to send for this value