Skip to content

1.7.0

Compare
Choose a tag to compare
@malcommac malcommac released this 05 Sep 05:42
· 52 commits to main since this release

2022-09-05

New Features / Enhancements

  • [NEW] Added ability to set responseTime on HTTPStubResponse 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 crashes decrementStrong (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.