Releases: tmenier/Flurl
Releases · tmenier/Flurl
Flurl.Http 2.0.1
Flurl.Http 2.0
This is big. See #205 for details and motivations.
New Features
- Aggressive reuse of
HttpClient
(single instance per host) by default when not managing FlurlClient explicitly (#144) IFlurlClientFactory
andFlurlClientFactoryBase
allow for easily customizing caching/reuse strategy- Better IoC support with alternative
IFlurlClientFactory
implementation (#226) ConnectionLeaseTimeout
setting to deal with potential DNS issue (#222)- New
FlurlRequest
object implicitly created instead ofFlurlClient
in fluent expressions Headers
available at both request and client level (#157)- URL builder methods and request configuration methods (
WithHeaders
, etc) can be called in any order in fluent expressions (#211) FlurlClient.Request
method for fluently building a request off a client (#211)FlurlClient.BaseUrl
property to (optionally) build all requests off of (#211)WithTimeout
specific to a single requestSettings
available onFlurlRequest
,FlurlClient
,HttpTest
, andFlurlHttp
(global) level, each inheriting defaults from a level up (#205 (comment))- Ability to fluently tweak request from
BeforeCall
/BeforeCallAsync
(#213) - More robust
FlurlHttpException.Message
(#217) - New
HttpTest
assertions:WithHeader
/WithoutHeader
(#223)
Breaking Changes from 1.x
- All fluent extension methods on
IFlurlClient
moved toIFlurRequest
, and all fluent extension methods onUrl
andstring
that previously returnedIFlurlClient
now returnIFlurlRequest
(Typical usages shouldn't break, but custom extensions should be updated to follow this new pattern) FlurlClient.Url
removed (superseded byFlurlRequest.Url
)FlurlClient.WithUrl
removed (superseded byFlurlClient.Request
)FlurlClient.ConfigureClient
renamed toFlurlClient.Configure
ConfigureClient
extensions onIFlurlRequest
,Url
, andstring
replaced byConfigureRequest
Url.ConfigureHttpClient
removedFlurlHttpSettings.DefaultTimeout
replaced byFlurlHttpSettings.Timeout
(like other settings, it's the "default" when defined at client or global level)FlurlClient.Clone
removed- Several
FlurlClient
constructors removed FlurlHttpSettings.Clone
removedFlurlHttpSettings.AutoDispose
removed (auto-dispose behavior no longer supported because short-lived clients is not a recommended practice)IHttpClientFactory.CreateClient
no longer takes aUrl
arg (more relevant toIFlurlClientFactory.Get
, where caching strategy should be defined)HttpCall.Url
removed (superseded byHttpCall.FlurlRequest.Url
HttpCall.Settings
removed (superseded byHttpCall.FlurlRequest.Settings
WithHeaders(object)
converts underscores in property names to hyphens in header names by default (#44)
Bug Fixes
Flurl 2.5.0
Dropping PCL target, adding .NET Standard 1.0
Flurl.Http 1.2.0
Flurl 2.4.0
Flurl.Http 1.1.3
Flurl.Http 1.1.2
Flurl 2.3.0
- Added new overloads of
SetQueryParam
andSetQueryParams
for adding query params with just a name and no value (#164) - Added optional
NullValueHandling
setting to other overloads ofSetQueryParam
andSetQueryParams
. Possible values:NameOnly
,Remove
(default),Ignore
. Url.Path
is writeable.
Flurl.Http 1.1.1
- Added more variations of query param asserts (#102)
- Added
HttpTest.ShouldHaveMadeACall()
andHttpTest.ShouldNotHaveMadeACall()
- Added
HttpCallAssertion.Without(Func<HttpCall, bool> match)
for testing "not" conditions HttpCall.Url
is now aFlurl.Url
object instead of a string (non-breaking sinceUrl
implicitly converts to string)- Better messages when Flurl's call assertions fail
Flurl.Http 1.1
HttpTest
works with tests running in parallel in .NET 4.5 and .NET Standard (including .NET Core) (#67)IFlurlClient
interface for better IoC and mocking support (#146)- New
FlurlClient
constructors for better DI support (#146) - Assert query params (#102)
- BREAKING:
AutoDispose
property moved fromFlurlClient
toFlurlHttpSettings
.