Releases: immobiliare/RealHTTP
Releases · immobiliare/RealHTTP
1.8.3
1.8.2
1.8.1
1.8.0
2022-11-27
NEW FEATURES
- [#69] Added a new retry strategy (
.afterTask(TimeInterval, RetryTask, RetryTaskErrorCatcher?)
) to allow performing an async task before retrying the original request. With this new option is possible to perform work outsideRealHTTP
and inject whatever you need into the original request. - [#73] Added an explicit option for specifying boolean and array encoding strategies when adding parameters in bulk via
formURLEncodedBody()
function. - [#72] All methods and properties of
HTTPAltRequestValidator
are now marked asopen
to allow further customization of the validation behaviors.
FIXES
- [#68] Removed warning for
withTaskCancellationHandler()
method inHTTPDataLoader
in Swift 5.5. Also fixed thetest_largeFileTestResume()
unit test - [#70] Fixed the
match(URL:)
(with.ignoreQueryParameters
)HTTPStubber
function, which failed to match an URL when the port is explicitly set.
CONTRIBUTORS
- Thanks to @frajaona for the new retry request strategy in #69
- Thanks to @nashfive for suggestion about #73
- Thanks to @aetherealtech for the report about the bug with stubber in #70
- Thanks to @NicFontana for fixing large download's unit test and the squash of continuation function deprecation in #68
1.7.4
1.7.3
1.7.2
1.7.1
1.7.0
2022-09-05
New Features / Enhancements
- [NEW] Added ability to set
responseTime
onHTTPStubResponse
to simulate different network conditions
Example:
let mock = try HTTPStubRequest()
.match(urlRegex: "(?s).*")
.stub(for: .get, {
$0.statusCode = .ok
$0.responseTime = .withSpeed(.speed1kbps) <--- SIMULATE A VERY SLOW NETWORK
$0.body = ...
$0.headers = [
...
]
})
Fixes
- [FIX] #59 - Fixed crash in
HTTPMetrics
: Attempted to dereference garbage pointer - [FIX] #58 - Fix for
HTTPDataLoader
crashesdecrementStrong
(line 438) - [FIX] #57 - Fix for
waitForStatusRecordUnlock
crash, thread lock
NOTICE
RealHTTP built-in stubber will soon be removed from this package into a separate package. No changes at APIs level will be applied.