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
Flurl makes it fairly painless to interoperate with more "native" representations of URLs like System.Uri and String. For example, Flurl.Url has a constructor that takes a string and another that takes a System.Uri, and its ToString and ToUri methods seamlessly convert back. But with strings it takes things a step farther and provides a full set of string extension method that mirror those on Url so you can even skip the tedious step of creating a Url object explicitly.
Lots of .NET libraries (especially those from Microsoft) tend to standardize on System.Uri. So it seems it would be equally useful (or more so) to have all those string extension methods available on System.Uri as well.
For example, if you're working with a library that speaks System.Uri but you'd like to use Flurl's builder methods to modify one, you can do that pretty directly:
uri=uri.AppendPathSegment("foo")// a Flurl.Url was created, minus the noise .SetQueryParams(new{x=1,y=2}).ToUri();// convert back
Not to be left out, Flurl.Http will also get new System.Uri extensions to mirror its string extensions:
varthing=awaituri.GetJsonAsync<T>();
The text was updated successfully, but these errors were encountered:
Flurl makes it fairly painless to interoperate with more "native" representations of URLs like
System.Uri
andString
. For example,Flurl.Url
has a constructor that takes a string and another that takes aSystem.Uri
, and itsToString
andToUri
methods seamlessly convert back. But with strings it takes things a step farther and provides a full set of string extension method that mirror those onUrl
so you can even skip the tedious step of creating aUrl
object explicitly.Lots of .NET libraries (especially those from Microsoft) tend to standardize on
System.Uri
. So it seems it would be equally useful (or more so) to have all those string extension methods available onSystem.Uri
as well.For example, if you're working with a library that speaks
System.Uri
but you'd like to use Flurl's builder methods to modify one, you can do that pretty directly:Not to be left out, Flurl.Http will also get new
System.Uri
extensions to mirror its string extensions:The text was updated successfully, but these errors were encountered: