title: Basic Mono<Map<String, String>> of WebFlux on handler class question
body: <p>This is the simple <code>Mono&lt;Map&lt;String, String&gt;&gt;</code> question of webflux. First the router class is</p>
  
  <pre><code>public RouterFunction&lt;ServerResponse&gt; routesUser(UserHandler handler) {
  
          return RouterFunctions.route(RequestPredicates.GET("/route/user/all"), handler::findAll)
                      .andRoute(RequestPredicates.POST("/route/user/login"), handler::authenticate);
  </code></pre>
  
  <p>And the next is the client codes of webclient.</p>
  
  <pre><code>Map&lt;String, String&gt; mapUser = new HashMap&lt;String, String&gt;();
  mapUser.put("username", "joseph");
  mapUser.put("password", "password");
  
  client.post().uri("/route/user/login").body(Mono.just(mapUser), Map.class).exchange()
                  .map(ClientResponse::statusCode).subscribe(response -&gt; System.out.println("Login : " + response.getReasonPhrase()));
  </code></pre>
  
  <p><code>Map&lt;String, String&gt; mapUser</code> is transfered to webflux handler class successfully.</p>
  
  <p>I have the basic question on authenticate method of userhandler class.</p>
  
  <pre><code>public Mono&lt;ServerResponse&gt; authenticate(ServerRequest request) {
          Mono&lt;Map&lt;String, String&gt;&gt; monoMapUser = request.bodyToMono(Map.class);
  
          monoMapUser.map(m -&gt; {
              return m.get("username");
          }).subscribe(System.out::println);
  </code></pre>
  
  <p><code>monoMapUser.subscribe(System.out::println)</code> prints the right username joseph. </p>
  
  <p>How I can extract the username and password from monoMapUser like this?</p>
  
  <pre><code>String username = monoMapUser.map(m -&gt; {return m.get("username");}.(????)
  String password = monoMapUser.map(m -&gt; {return m.get("password");}.(????)
  </code></pre>