anchor.diff:  
   	public Mono<ServerResponse> listPeople(ServerRequest request) { // <1>
   		Flux<Person> people = repository.allPeople();
  -		return ServerResponse.ok().contentType(APPLICATION_JSON).body(people, Person.class);
  +		return ok().contentType(APPLICATION_JSON).body(people, Person.class);
   	}
   
   	public Mono<ServerResponse> createPerson(ServerRequest request) { // <2>
   		Mono<Person> person = request.bodyToMono(Person.class);
  -		return ServerResponse.ok().build(repository.savePerson(person));
  +		return ok().build(repository.savePerson(person));
   	}
   
   	public Mono<ServerResponse> getPerson(ServerRequest request) { // <3>
   		int personId = Integer.valueOf(request.pathVariable("id"));
  -		Mono<ServerResponse> notFound = ServerResponse.notFound().build();
  -		Mono<Person> personMono = repository.getPerson(personId);
  -		return personMono
  -				.flatMap(person -> ServerResponse.ok().contentType(APPLICATION_JSON).body(fromObject(person)))
  -				.switchIfEmpty(notFound);
  +		return repository.getPerson(personId)
  +			.flatMap(person -> ok().contentType(APPLICATION_JSON).body(fromObject(person)))
  +			.switchIfEmpty(ServerResponse.notFound().build());
   	}
   }
   ----
  
positive.code:   request -> ServerResponse.ok().body(fromObject("Hello World"));
  ----
  
  Writing handler functions as lambda's, as we do above, is convenient, but perhaps lacks in
  readability and becomes less maintainable when dealing with multiple functions. Therefore, it is
  recommended to group related handler functions into a handler or controller class. For example,
  here is a class that exposes a reactive `Person` repository:
  
  [source,java,indent=0]
  [subs="verbatim,quotes"]
  ----
  import static org.springframework.http.MediaType.APPLICATION_JSON;
  import static org.springframework.web.reactive.function.BodyInserters.fromObject;
  
  public class PersonHandler {
  
negative.code: 
  
  
  [[webflux-fn-overview]]
  == Overview
  
  An HTTP request is handled with a **`HandlerFunction`** that takes `ServerRequest` and
  returns `Mono<ServerResponse>`, both of which are immutable contracts that offer JDK-8
  friendly access to the HTTP request and response. `HandlerFunction` is the equivalent of
  an `@RequestMapping` method in the annotation-based programming model.
  
  Requests are routed to a `HandlerFunction` with a **`RouterFunction`** that takes
  `ServerRequest` and returns `Mono<HandlerFunction>`. When a request is matched to a
  particular route, the `HandlerFunction` mapped to the route is used. `RouterFunction` is
  the equivalent of an `@RequestMapping` annotation.
  
  `RouterFunctions.route(RequestPredicate, HandlerFunction)` provides a router function
  default implementation that can be used with a number of built-in request predicates.
  For example:
  
  [source,java,indent=0]
  [subs="verbatim,quotes"]
  ----
  import static org.springframework.http.MediaType.APPLICATION_JSON;
  import static org.springframework.web.reactive.function.server.RequestPredicates.*;
  
  PersonRepository repository = ...
  PersonHandler handler = new PersonHandler(repository);
  
  RouterFunction<ServerResponse> route =
  	route(GET("/person/{id}").and(accept(APPLICATION_JSON)), handler::getPerson)
  		.andRoute(GET("/person").and(accept(APPLICATION_JSON)), handler::listPeople)
  		.andRoute(POST("/person"), handler::createPerson);
  
  
  public class PersonHandler {
  
  	// ...
  
  	public Mono<ServerResponse> listPeople(ServerRequest request) {
  		// ...
  	}
  
  	public Mono<ServerResponse> createPerson(ServerRequest request) {
  		// ...
  	}
  
  	public Mono<ServerResponse> getPerson(ServerRequest request) {
  		// ...
  	}
  }
  ----
  
  One way to run a `RouterFunction` is to turn it into an `HttpHandler` and install it
  through one of the built-in <<web-reactive.adoc#webflux-httphandler,server adapters>>:
  
  * `RouterFunctions.toHttpHandler(RouterFunction)`
  * `RouterFunctions.toHttpHandler(RouterFunction, HandlerStrategies)`
  
  
  Most applications will run through the WebFlux Java config, see <<webflux-fn-running>>.
  
  
  
  
  [[webflux-fn-handler-functions]]
  == HandlerFunction
  
  `ServerRequest` and `ServerResponse` are immutable interfaces that offer JDK-8 friendly
  access to the HTTP request and response with
  http://www.reactive-streams.org[Reactive Streams] back pressure against the request
  and response body stream. The request body is represented with a Reactor `Flux` or `Mono`.
  The response body is represented with any Reactive Streams `Publisher`, including `Flux`
  and `Mono`. For more on that see
  <<web-reactive.adoc#webflux-reactive-libraries,Reactive Libraries>>.
  
  
  
  [[webflux-fn-request]]
  === ServerRequest
  
  `ServerRequest` provides access to the HTTP method, URI, headers, and query parameters
  while access to the body is provided through the `body` methods. This is how to extract
  the request body to a `Mono<String>`:
  
   Mono<String> string = request.bodyToMono(String.class);
  
  This is how to extract the body into a `Flux`, where `Person` is a class that can be
  deserialised, e.g. from JSON or XML:
  
   Flux<Person> people = request.bodyToFlux(Person.class);
  
  `bodyToMono` and `bodyToFlux` are convenience methods that use the generic
  `ServerRequest.body(BodyExtractor)` method. `BodyExtractor` is a functional strategy
  interface that you can use to write your own extraction logic, but common `BodyExtractor`
  instances can be obtained through the `BodyExtractors` utility class. The above examples
  can also be written as follows:
  
   Mono<String> string = request.body(BodyExtractors.toMono(String.class);
   Flux<Person> people = request.body(BodyExtractors.toFlux(Person.class);
  
  
  
  [[webflux-fn-response]]
  === ServerResponse
  
  `ServerResponse` provides access to the HTTP response and since it is immutable, you use
  a build to create it. The builder can be used to set the response status, to add response
  headers, or to provide a body. Below is an example with a 200 (OK) response with JSON
  content:
  
   Mono<Person> person = ...
   ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(person);
  
  This is how to build a 201 (CREATED) response with `"Location"` header, and no body:
  
   URI location = ...
   ServerResponse.created(location).build();
  
  
  
  [[webflux-fn-handler-classes]]
  === Handler Classes
  
  We can write a handler function as a lambda. For example:
  
  [source,java,indent=0]
  [subs="verbatim,quotes"]
  