You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
implements checkNotModified for ServerRequest #24173
I've added checkNotModified to ServerRequest in both
WebFlux.fn and WebMvc.fn.
However, given the programming model of the functional endpoints, where you return a response instead of having the response available as a method parameter, the method does not return a boolean, but rather
a response wrapped in a Mono/Optional. If the resource has
not been changed, the not-modified response can be returned directly;
if the resource has changed, the user can create a corresponding
response using switchIfEmpty/orElse(Get).
Activity
poutsma commentedon Mar 11, 2020
I've added
checkNotModifiedtoServerRequestin bothWebFlux.fn and WebMvc.fn.
However, given the programming model of the functional endpoints, where you return a response instead of having the response available as a method parameter, the method does not return a boolean, but rather
a response wrapped in a Mono/Optional. If the resource has
not been changed, the not-modified response can be returned directly;
if the resource has changed, the user can create a corresponding
response using
switchIfEmpty/orElse(Get).Check out the method javadoc to see an example.
Add ServerRequest::checkNotModified