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.
### *Introducing support for Swift Concurrency*
```swift
let request: APIRequest<Int,APIError> = tron.codable
.request("status/200")
let result = try await request.sender().value
```
Swift Concurrency methods require Swift 5.5 / Xcode 13.2 / iOS 13 / tvOS 13 / macOS 10.15 / watchOS 6.
Read more usage examples in [README](https://github.com/MLSDev/TRON#swift-concurrency).
### Added
* `download(_:to:)` and `download(_:to:resumingFrom:)` methods that create `DownloadAPIRequest` with <URL, ErrorModel> generic constraints to simplify requests creation, where you need only URL from resulting operation.
* Structured Concurrency support for Swift 5.5 and higher: `RequestSender`, `DownloadRequestSender` types.
### Fixed
* Issue, that could lead to sending network request with api stubs enabled, but Session.startRequestsImmediately property was set to false.
### Breaking
* New deployment targets: iOS 11 / tvOS 11 / macOS 10.13 / watchOS 4 / Xcode 13. OS deployment targets now match minimum deployment targets, supported by Xcode 14.
### Changed
* Improve Combine extensions to work better with stubs, that return synchronously.
### Fixed
* Swift 5.4 warnings
### Changed
* RxSwift dependency bumped to 6.0 and higher
### Added
* Ability to modify `URLRequests` before it's adapted and sent:
```swift
tron.codable
.request("status")
.modifyRequest { $0.httpShouldHandleCookies = false }
```
This feature uses Alamofire.RequestModifier closure, that can also be set without DSL on request instance directly:
```swift
let request : APIRequest<Post,Empty> = tron.codable.request("posts")
request.requestModifier = { urlRequest in
urlRequest.httpShouldHandleCookies = false
}
```
### Added
* Combine support on supported platforms through `publisher()` method on `APIRequest`, `UploadAPIRequest`, `DownloadAPIRequest`.
* `APIError.isCancelled` property, that tells, whether request, that errored, was cancelled by sender.
### Changed
* `Alamofire.ParameterEncoding`, `JSONEncoding` and `URLEncoding` are now exposed through TRON API and don't require importing Alamofire to use.
### Deprecated
* `NetworkActivityPlugin` is deprecated on iOS 13 and higher, because `UIApplication.isNetworkActivityIndicatorVisible` property it has been switching is deprecated on iOS 13 and higher.
### Changed
* Several `Alamofire` types that are exposed through TRON API's are now implicitly exported to allow using them without needing to write `import Alamofire`. See `Exports.swift` file for a list of them.
### Added
* `FileURLPassthroughResponseSerializer`, which can be used as a response serializer for `DownloadAPIRequest` when you are only interested in URL of downloaded file.
### Fixed
* `NetworkLoggerPlugin` now correctly skips cancelled requests
* Added `DownloadAPIRequest.perform(withSuccess:failure:)` method, similar to `APIRequest` and `UploadAPIRequest` methods.
* `BaseRequest.headers` now default to `HTTPHeaders.default` to allow sending Alamofire default headers such as "Accept-Language", "Accept-Encoding", "User-Agent".