Flurl.Http v3.0.0-pre3b Release Notes
Release Date: 2019-11-09 // over 4 years ago-
๐ [Features to be pre-released incrementally. Will update here.]
๐ New Features
FlurlResponse
introduced, primarily to enable inspecting response and deserializing body in separate steps (#354)- โ Tests can be set up to return different fake responses depending on the URL or any other request conditions (#481)
- โ
HttpTest.ForCallsTo(...).AllowRealHttp()
for allowing real calls to be made in a test for specific URLs or any other request conditions (#225) - All extension methods on
Flurl.Url
andstring
are now also available onSystem.Uri
(#489)
๐ฅ Breaking Changes from 2.x
- Fluent methods that previously returned
HttpResponseMessage
(suchGetAsync
,PostAsync
, etc) now returnFlurlResponse
. If you're usingGetJsonAsync
or chainingReceiveXXX
methods, this shouldn't break anything (#354) - ๐
HttpCall
is nowFlurlCall
, and several properties ofFlurlCall
andFlurlHttpException
were moved or renamed (#488) - When asserting a specific URL was called, it must be a full string match rather than "contains" or "starts with". Add a
*
wildcard to the beginning or end if you need partial match behavior (#323) - โ When faking responses in tests, the last response in the queue becomes "sticky" rather than falling back to empty 200 responses (#482)
- ๐
HttpTest.ResponseQueue
public property has been removed. Underlying queue implementation changed significantly to support new features, and hopefully accessing it directly isn't needed. UseRespondWith
methods to build the queues.
๐ Bug Fixes
- โ In tests, dequeuing fake responses is fully thread-safe (#366)