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.