Skip to content
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

[Feature Request] Add 'Url' ctor overload that takes 'Uri' as parameter instead of 'string' #406

Closed
julealgon opened this issue Dec 18, 2018 · 1 comment

Comments

@julealgon
Copy link

The Url class currently has a single constructor that takes a string instance to create the object.

I think having an overload that takes a Uri would make some usages simpler.

In my particular case, I'm dealing with a Uri value as the base address and the existing API forces me to do a .ToString on it to work with this library.

I believe this is similar to the reasoning in #62 where Uri extension points were requested. IMHO both should be available especially because using raw strings to represent urls in code is a known bad practice and flagged by FxCop and other tools.

@tmenier tmenier added this to the Flurl 2.8.1 milestone Jan 20, 2019
@tmenier
Copy link
Owner

tmenier commented Jan 20, 2019

I think this is a good idea. I'm actually thinking about giving System.Uri all the same extension methods that string gets. But that would be a 3.0 thing - this one I can knock off quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants