-
Notifications
You must be signed in to change notification settings - Fork 191
New method: HttpRequest.GetFullUrl #341
Comments
|
No, we still have many of the round tripping problems. What format should all of the components be in? Human readable or encoded for use in headers? I suspect you need at least two methods. |
Not sure why we'd have roundtripping problems. It's just a concat of the parts of the URL that we already have |
The values have already been processed by multiple layers and are in different formats. e.g. Paths are unescaped, query is still escaped, who knows what state the Host is in, etc.. Just concatenating them back together gives you a Frankenstein url. You have to consider both the current format of the data and the desired format/usage of the result. This is one of the reasons we haven't done this. The only reasonable request I've heard for the full url so far was for logging. What other usages have been requested? Almost everybody that has asked for this ends up just wanting the pieces, not the full url. |
Would this include the query string as well? While developing I print each request path to the console to make sure stuff gets called by JS. Having the query string as well would be nice. |
I think you can get the querystring with |
@TomGroeneboer You can get it from |
We should re-discuss the names of these. Those the current names are technically correct, I don't believe they will lead to correct usage. The doc comments explain what's what, but I'm sure they'll be often ignored. I recommend perhaps changing |
Add a new extension method HttpRequest (GetFullUrl) that returns a string.
The text was updated successfully, but these errors were encountered: