title: Play 2 Multiple BodyParser
body: <p>How to make a controller's action method containing two different bodyparser? For example,</p>
  
  <pre><code>@BodyParser.Of(BodyParser.Json.class)
  @BodyParser.Of(BodyParser.FormUrlEncoded.class)
  public static Result register() {
  
      RequestBody body = request().body();
      JsonNode node = body.asJson();
      Map&lt;String, String[]&gt; map = body.asFormUrlEncoded();
  
      if(node != null) {
          return ok("Got: " + node);
      } else if (map != null) {
          return ok("Got: " + map);
      } else {
          return badRequest("Expecting application/json request body");
      }
  }
  </code></pre>