-
Notifications
You must be signed in to change notification settings - Fork 103
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
Unexpected behaviour constructing requests with query parameters values containing white spaces #56
Comments
@ederparaiso Thanks for that. I apologise for the late reply. I will look into this |
Fixed in v4.0.0 You would have to stub as follows:
Which should be match the stubbed if you are hitting from your browser:
Which should be match the stubbed if you are hitting from your browser: |
I added more examples in the docs. I hope this helps |
I'm not sure if its a bug or limitation of the lib. Maybe a future enhancement.
I have a request with a query param who value contains a white space.
I followed example bellow in README but it does not work:
My query param was
And in jUnit test
which is encoded and returns not found
So i changed de yml query param to "boo+and+foo" in order to match, but i'm still getting 404.
The solution i found was encoding the '+' char in yml file:
And change my test to:
in order to encode "+" char to "%2B" and them match.
I think that is caused by regex processing, so i tried another test, escaping '+' symbol in yml file
In this way, i can write request strings in java without any encoding troubles as folowing:
As i said, i'm not sure if it can be considered as a bug or lib's limitation. Maybe a future enhancement, or just an update in docs about this specific case. Another chars encoding does not have this problem.
I hope that it helps to improve this awesome lib. Thanks!
The text was updated successfully, but these errors were encountered: