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
{{ message }}
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
Why is a method that does more than encoding called Encode? It not only encodes it also combines several uri parts into an uri. And why are two methods called Encode when one creates an absolute path and the other creates an absolute uri? Why is the unescaped version called so differently (GetDisplayUrl)? Why is the convenience method GetEncodedUrl named this way although it does exactly the same as the Encodemethod? Only difference is that it is an extension method for HttpRequest. Why is there no convenience method for the non-absolute version?
Maybe I just don't get it but here is my proposal:
Why not just have two method names GetAbsolutePath and GetUrl? Then give those two methods an encode or httpEncode or encodeComponents bool parameter so there is no need for any Display methods. Then make overloads of both methods that act as convenience methods for HttpRequest.
A relative reference that begins with a single slash character is
termed an absolute-path reference. A relative reference that does
not begin with a slash character is termed a relative-path reference.