-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Encoded RequestURI when using QueryParam and RequestSpecBuilder #47
Comments
That definitely looks like a defect :) Thank you for reporting, I’ll have a look over / after the weekend. |
Thanks for considering this defect. Have a great day, |
I can reproduce the issue and I've located the part of the code where the problem occurs. Shouldn't take me too long to fix this. |
Sounds amazing. Thanks again! |
Hey @MuresanCristianRichard, I think I fixed this just now. Could you please have a look at this commit? And specifically whether this test represents your situation correctly:
If so, I'll release a new version ASAP. |
Hi @basdijkstra . Have a great day! |
Hey @MuresanCristianRichard, new version available now: https://www.nuget.org/packages/RestAssured.Net/2.2.1 Could you please update to this version and see if it properly resolves your issue? If so, can I ask you to close the issue? |
Looks good in our tests too. We implemented a short workaround but I just delete it and It works properly now. Have a great day! |
Hi Bas,
I noticed an issue when I try to construct the RequestURI using RequestSpecBuilder and QueryParam.
Given the following example:
The result is a 404 and by debugging we got:
{Method: GET, RequestUri: 'https://somehost.net/api/check-something%3Fname=john'
->encoded
By changing the test method to this:
that means we send the whole path for RequestURI we got the following result:
statusCode 200 and
Method: GET, RequestUri: 'https://somehost.net/api/check-something?name=john'
The encoding value from "?" to "%3F" makes the request to fail.
There is a method in Java RestAssured called:
.urlEncodingEnabled(false)
example:
RequestSpecification mySpec = new RequestSpecBuilder().setUrlEncodingEnabled(false)
Is there a way to fix this in my code or is this a Defect in library that can be released soon?
Thanks!
The text was updated successfully, but these errors were encountered: