@@ -16,15 +16,15 @@ public static class Resource {
1616 @ GET
1717 public Result any () {
1818 return Results
19- .when ("text/html" , () -> View . of ("test" , "this" , "body" ))
19+ .when ("text/html" , () -> Results . html ("test" ). put ( "this" , "body" ))
2020 .when ("*/*" , () -> "body" );
2121 }
2222
2323 @ Path ("/html" )
2424 @ GET
2525 @ Produces ("text/html" )
2626 public View html () {
27- return View . of ("test" , "this" , "body" );
27+ return Results . html ("test" ). put ( "this" , "body" );
2828 }
2929
3030 @ Path ("/json" )
@@ -44,7 +44,7 @@ public String json() {
4444
4545 get ("/any" , req ->
4646 Results
47- .when ("text/html" , () -> View . of ("test" , "this" , "body" ))
47+ .when ("text/html" , () -> Results . html ("test" ). put ( "this" , "body" ))
4848 .when ("*/*" , () -> "body" ));
4949
5050 get ("/status" , req ->
@@ -53,10 +53,10 @@ public String json() {
5353
5454 get ("/like" , req ->
5555 Results
56- .when ("text/html" , () -> View . of ("test" , "this" , "body" ))
56+ .when ("text/html" , () -> Results . html ("test" ). put ( "this" , "body" ))
5757 .when ("application/json" , () -> "body" ));
5858
59- get ("/html" , (req , resp ) -> resp .send (View . of ("test" , "this" , "body" )))
59+ get ("/html" , (req , resp ) -> resp .send (Results . html ("test" ). put ( "this" , "body" )))
6060 .produces (MediaType .html );
6161
6262 get ("/json" , (req , resp ) -> resp .send ("body" ))
0 commit comments