Flurl.Http v3.0.0-pre4 Release Notes
Release Date: 2019-09-13 // over 4 years ago-
๐ Flurl 3.0 contains a major rewrite of the URL building/parsing engine. It features better support for relative URLs, and brings its parsing capabilities more in line with
System.Uri
, while also addressing some of its quirks.๐ This release also adds the same set of URL-building extension methods currently on
string
toSystem.Uri
(#489).๐ New
Url
properties:Scheme
(read/write)UserInfo
(read/write)Host
(read/write)Port
(read/write)Authority
(read-only,UserInfo
+Host
+Port
)Root
(read-only,Scheme
+Authority
)PathSegments
(modifiable)IsRelative
(read-only)IsSecureScheme
(read-only, true for https or wss)
๐ New fluent builder methods on
Flurl.Url
,System.Uri
, andstring
:RemovePathSegment()
(removes the last segment)- ๐
RemovePath()
- ๐
RemoveQuery()
- โช
Reset()
(restoresUrl
to its original state as constructed, NOT available onstring
)
Other:
- ๐ New static utility mthod:
Url.ParsePathSegments(string)
(assumes entire string is the path portion of a URL) - ๐
Url.SetQueryParams(object)
gives special treatment to collections ofTuple<T1, T2>
andValueTuple<T1, T2>
, parsing their values as name-value pairs.
๐ฅ BREAKING changes on
Url
:Path
changed to be more in line with the formal definition. Previously it included everything (scheme, host, etc.) up to the query string. It now starts after the host/port, including the leading/
if present.IsValid()
instance method was removed. It was confusing in the case of relative URLs since arguably any string could be considered a valid relative URL. Check theIsRelative
property instead. (StaticUrl.IsValid(string)
method is still available but, same a before, returns true only for valid absolute URLs.)
๐ Bug fixes:
Url.ToUri()
now works for relative URLs (#407)