-
Notifications
You must be signed in to change notification settings - Fork 535
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
Empty post body in HTTP server #102
Comments
This is trivial, isn't it? |
Try: router.route().handler(BodyHandler.create()); You're overwriting the body handler with the second handler. Routes can only have one handler. A very similar issue was discussed on the google group not very long ago. Also.... In your main, you're deploying the Server immediately followed by the client without waiting, so there is no guarantee the server is started before the client sends the request. |
When you do this: router.route().handler(BodyHandler.create()).method(HttpMethod.POST).path("/some/resource") You're creating a single route, then first setting the handler to be a body handler, setting the method and path then setting the handler to be otherHandler (overwriting the bodyHandler). |
Yeah, that's it. I must have been blind :-) |
If a HTTP client posts some String to a vert.x HTTP server the body received by the server seems to be empty although the server registered an BodyHandler.
I have created an reproducer for that issue.
The text was updated successfully, but these errors were encountered: