1.0.0-beta.1
·
334 commits
to main
since this release
TRON 1.0 is a major release with a lot of new features and breaking changes. To find out more about philosophy of those and how to adapt to new API's, read [TRON 1.0 Migration Guide](/Docs/1.0 Migration Guide.md).
Breaking changes
RequestTokenprotocol removed, perform request methods now returnAlamofire.Request?to allow customization. When request is stubbed, nil is returned.tron.multipartRequest(path:)removed, usetron.uploadMultipart(path:formData:)method insteadMultipartAPIRequestperformWithSuccess(_:failure:progress:cancellableCallback:)method is replaced byperformMultipart(success:failure:encodingMemoryThreshold:encodingCompletion:)MultipartAPIRequestno longer subclassesAPIRequest- they both now subclassBaseRequest.appendMultipartData(_:name:filename:mimeType:)onMultipartAPIRequestis removed. Please useAlamofire.Manager.MultipartFormDatabuilt-in methods to append multipart data- RxSwift extension on
MultipartAPIRequestreworked to return single Observable EventDispatcherclass and correspondingTRON.dispatcher,APIRequest.dispatcherproperty are replaced byTRONandAPIRequestproperties -processingQueueandresultDeliveryQueue, which are used to determine on which queue should processing be performed and on which queue results should be delivered.ProgressandProgressClosuretypealiases have been removed
Added
upload(path:file:)- upload from fileupload(path:data:)- upload dataupload(path:stream:)- upload from streamdownload(path:destination:)- download file to destinationdownload(path:destination:resumingFromData:)- download file to destination, resuming from datauploadMultipart(path:formData:)- multipart form data uploadperform(completion:)method, that acceptsAlamofire.Response-> Void block.
Deprecations
APIRequestperformWithSuccess(_:failure:)method is deprecated, new name -perform(success:failure:)