The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
## 2023-02-28
- [NEW] #85 Added `Set-Cookie` option in `HTTPHeaders`
- [FIX] #84 Fix download percentage not always getting to 1 due to rounding errors
## 2023-02-17
### FIXES
- [#82] Cookies set in `Set-Cookie` header are now printed in `cURLDescription()` (along with any set in `NSHTTPCookieStorage`)
## 2022-12-07
### FIXES
- [#75] Fixed a memory leak with `HTTPClient`'s `.delegate` property which is not marked as `weak`.
## 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 outside `RealHTTP` 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 as `open` to allow further customization of the validation behaviors.
### FIXES
- [#68] Removed warning for `withTaskCancellationHandler()` method in `HTTPDataLoader` in Swift 5.5. Also fixed the `test_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
## 2022-10-24
### New
- [#66] `HTTPStubber`'s `match()` function is now public and can be used to test for a matched stub request.
## 2022-10-09
### Fixes
- [#62] Fixed an issue with `headers` values priority override when setting a request `body` to replace any previously customized headers collection both from parent client's headers and specific requests headers. See #63 for more details.
## 2022-09-23
### Fix
- [FIX #61] Fix occasional crash at startup with the `URLProtocol` subclass for RealHTTP Stubber `HTTPStubURLProtocol`
## 2022-09-09
### Fix
- [NEW] #60 Temporary disabled SwiftLintPlugin due to a bug with Xcode 13.4.1 and SPM
## 2022-09-05
### New Features / Enhancements
- [NEW] Added ability to set `responseTime` on `HTTPStubResponse` to simulate different network conditions
Example:
```swift
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.
## 2022-07-23
### New Features / Enhancements
- [FIX] #56 - `HTTPClient` and `URLSessionTask` are incorrectly removed after the download, also breaking the `cURLDescription()` output.