You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I've got rather peculiar case, when I needed for an url to retain in exactly the same way, as it was in the string, because some parts of it are signed. The url contains things like %3D instead of =, etc. When the url is parsed by sttp these things are decoded, and when the request is sent using such Url instance - the url is technically the same from the http standards point of view, but the signature is no longer valid.
I solved this by playing with .pathSegmentsEncoding and .querySegmentsEncoding, so the url was exactly same when sending the request. But the url string is comming from an external API, so I can not be sure, that the url encoding they use would remain the same over time and thing would not break.
Wouldn't it be nice to be able to parse string to Url, bit retain whatever encoding was there? I.e. validate such escapes, but do not decode them. Not a piece of cake though, since we need to retain such infomation somewhere in Url, not to encode such escapes second time when rendering (or %3D would turn into %253D).