exploding-fish
exploding-fish copied to clipboard
Mixing param & param-raw has unexpected results
Snippet:
(uri/param
(uri/param-raw
(uri/uri "https://aaa.com")
"a"
"http://localhost:1111/user")
"b"
"something else")
produces this:
#<Uri https://aaa.com?a=http%3A%2F%2Flocalhost%3A1111%2Fuser&b=something+else>
My expectation was parameters to be added without the other parameteres being modified.
That's a good point. The way things are implemented now, when you do uri/param, it decodes everything, adds your new parameter, and re-encodes everything.
But I think you're right that it could be unexpected behavior. I'll look into fixing it.
@wtetzner - great, thanks a lot!