-
Notifications
You must be signed in to change notification settings - Fork 298
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
Plus sign is not escaped correctly #48
Comments
Hmm I suppose we'll need context-sensitive decoding, not only encoding, wich makes sense :) The |
By query string, do you mean the named URI parameters? Actually my use case is a URI as follows:
The context is looking up by phone that is. Come to think about it, "+" is really used as a space in this context. However, does it make sense to still have it as a space in sttp? After all, you can perfectly use spaces in query string and they will be encoded properly. |
If you want to include The interpolator assumes that when you write down a literal URI (as a
|
Hm, then this does not seem to be working with sttp.get(uri"http://localhost:8888/appointment?phone=${"+1234"}").send() And on the server side (http4s): val root = Root / "appointment"
/*...*/
case req @ GET -> `root` :? PhoneParam(phoneRaw) =>
println(s"Raw request parameter: $phoneRaw") This prints:
|
Ah, come to think about it this may be http4s issue. |
No, you are right, somehow the + is not escaped correctly. I'll take a look tomorrow. |
I think it's an easy fix (only the |
Awesome, thank you for the quick fix @adamw! I will check it out tomorrow. |
Released 1.0.6 |
Workaround:
The text was updated successfully, but these errors were encountered: