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

NettyConnectorProvider (jersey-netty-connector) doesn't send query parameters in the Get Request #4369

Closed
luanjr opened this issue Jan 16, 2020 · 2 comments
Assignees
Milestone

Comments

@luanjr
Copy link

luanjr commented Jan 16, 2020

I am trying to send an HTTP request with query parameters using Jersey Client and setting NettyConnectorProvider (org.glassfish.jersey.connectors:jersey-netty-connector:2.25.1) as a provider to the config (org.glassfish.jersey.client.ClientConfig) by the method connectorProvider().
I tried to send the query parameters using the method queryparam(), but the values are not sent on the request.

Looking in the source code of NettyConectorProvider, it uses the method requestUri.getRawPath()) during the creation of DefaultFullHttpRequest, but this method returns the path without the query parameters.

nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,
HttpMethod.valueOf(jerseyRequest.getMethod()),
requestUri.getRawPath());

How can I send query parameters in a GET request using NettyConnectorProvider or is there a knowledge issue related to query parameters?

@senivam senivam self-assigned this Feb 13, 2020
@senivam
Copy link
Contributor

senivam commented Feb 13, 2020

Did you try:

requestUri.toASCIIString();

or

requestUri.getRawPath() + "?" + requestUri.getRawQuery()

instead of

requestUri.getRawPath()

as DefaultFullHttpRequest constructor parameter?

@jansupol
Copy link
Contributor

Fixed by #4393

@senivam senivam added this to the 2.30.1 milestone Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants