@@ -590,10 +590,10 @@ RouterFunction<ServerResponse> route = route()
590
590
.path("/person", builder -> builder // <1>
591
591
.GET("/{id}", accept(APPLICATION_JSON), handler::getPerson)
592
592
.GET(accept(APPLICATION_JSON), handler::listPeople)
593
- .POST("/person", handler::createPerson))
593
+ .POST(handler::createPerson))
594
594
.build();
595
595
----
596
- <1> Note that second parameter of `path` is a consumer that takes the a router builder.
596
+ <1> Note that second parameter of `path` is a consumer that takes the router builder.
597
597
598
598
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
599
599
.Kotlin
@@ -602,7 +602,7 @@ RouterFunction<ServerResponse> route = route()
602
602
"/person".nest {
603
603
GET("/{id}", accept(APPLICATION_JSON), handler::getPerson)
604
604
GET(accept(APPLICATION_JSON), handler::listPeople)
605
- POST("/person", handler::createPerson)
605
+ POST(handler::createPerson)
606
606
}
607
607
}
608
608
----
@@ -620,7 +620,7 @@ We can further improve by using the `nest` method together with `accept`:
620
620
.nest(accept(APPLICATION_JSON), b2 -> b2
621
621
.GET("/{id}", handler::getPerson)
622
622
.GET(handler::listPeople))
623
- .POST("/person", handler::createPerson))
623
+ .POST(handler::createPerson))
624
624
.build();
625
625
----
626
626
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
@@ -631,7 +631,7 @@ We can further improve by using the `nest` method together with `accept`:
631
631
accept(APPLICATION_JSON).nest {
632
632
GET("/{id}", handler::getPerson)
633
633
GET(handler::listPeople)
634
- POST("/person", handler::createPerson)
634
+ POST(handler::createPerson)
635
635
}
636
636
}
637
637
}
@@ -766,7 +766,7 @@ For instance, consider the following example:
766
766
.before(request -> ServerRequest.from(request) // <1>
767
767
.header("X-RequestHeader", "Value")
768
768
.build()))
769
- .POST("/person", handler::createPerson))
769
+ .POST(handler::createPerson))
770
770
.after((request, response) -> logResponse(response)) // <2>
771
771
.build();
772
772
----
@@ -784,7 +784,7 @@ For instance, consider the following example:
784
784
ServerRequest.from(it)
785
785
.header("X-RequestHeader", "Value").build()
786
786
}
787
- POST("/person", handler::createPerson)
787
+ POST(handler::createPerson)
788
788
after { _, response -> // <2>
789
789
logResponse(response)
790
790
}
@@ -815,7 +815,7 @@ The following example shows how to do so:
815
815
.nest(accept(APPLICATION_JSON), b2 -> b2
816
816
.GET("/{id}", handler::getPerson)
817
817
.GET(handler::listPeople))
818
- .POST("/person", handler::createPerson))
818
+ .POST(handler::createPerson))
819
819
.filter((request, next) -> {
820
820
if (securityManager.allowAccessTo(request.path())) {
821
821
return next.handle(request);
@@ -835,7 +835,7 @@ The following example shows how to do so:
835
835
("/person" and accept(APPLICATION_JSON)).nest {
836
836
GET("/{id}", handler::getPerson)
837
837
GET("", handler::listPeople)
838
- POST("/person", handler::createPerson)
838
+ POST(handler::createPerson)
839
839
filter { request, next ->
840
840
if (securityManager.allowAccessTo(request.path())) {
841
841
next(request)
0 commit comments