Skip to content

implements checkNotModified for ServerRequest #24173

Closed

Description

@kevin70

Hello.

Can implements method the checkNotModified in org.springframework.web.servlet.function.ServerRequest?

Thank you!

Activity

  1. self-assigned this
    on Jan 22, 2020
  2. added
    in: webIssues in web modules (web, webmvc, webflux, websocket)
    on Feb 5, 2020
  3. added this to the 5.2.4 milestone on Feb 5, 2020
  4. modified the milestones: 5.2.4, 5.3 M1 on Feb 17, 2020
  5. modified the milestones: 5.3 M1, 5.2.5 on Mar 11, 2020
  6. poutsma commented on Mar 11, 2020

    @poutsma
    Contributor

    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).

    Check out the method javadoc to see an example.

  7. added a commit that references this issue on Sep 17, 2026
    0dc1c7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions