Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x Add next() for io.helidon.webserver.http.ServerRequest #8711

Closed
essapp opened this issue Apr 30, 2024 · 3 comments
Closed

4.x Add next() for io.helidon.webserver.http.ServerRequest #8711

essapp opened this issue Apr 30, 2024 · 3 comments
Assignees
Labels
4.x Version 4.x invalid This doesn't seem right question Further information is requested triage webserver
Projects

Comments

@essapp
Copy link

essapp commented Apr 30, 2024

Environment Details

  • Helidon Version:4.x
  • Helidon SE or Helidon MP
  • JDK version:21.x
  • OS:mac
  • Docker version (if applicable):

Problem Description

3.x ServerRequest has next().continue request processing on the next registered handler.

@github-actions github-actions bot added this to Triage in Backlog Apr 30, 2024
@romain-grecourt
Copy link
Contributor

romain-grecourt commented Apr 30, 2024

The method has moved to ServerResponse.next()

@essapp
Copy link
Author

essapp commented May 4, 2024

My code:

@Override
 public void routing(HttpRules rules) {
  rules
      .any((req, res) -> {
        req.headers().contentType().ifPresent(mt -> {
        if (!mt.equals(MediaTypes.APPLICATION_JSON)) {
          sendUndefinedMediaType(res, mt.toString());
        } else {
            req.next();
          }
        });
      })
      .route(Http1Route.route(DELETE, "/", new DelData()::execute))
      .any((req, res) -> sendNotFound(res, "404"));
}

What should I do after using ServerResponse.next()?

@romain-grecourt
Copy link
Contributor

What should I do after using ServerResponse.next()?

Nothing, you simply return, that part hasn't changed.

@m0mus m0mus closed this as completed May 23, 2024
Backlog automation moved this from Triage to Closed May 23, 2024
@m0mus m0mus added invalid This doesn't seem right question Further information is requested labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x invalid This doesn't seem right question Further information is requested triage webserver
Projects
Backlog
  
Closed
Development

No branches or pull requests

4 participants