Elegant HTTP Networking in Swift
Released on 2019-09-04. All issues associated with this milestone can be found using this filter. Note: Alamofire 5 is now API stable.
cancelAllRequests
method on Session
to cancel all in flight requests.
FileManager
instance into UploadRequest
.
DataPreprocessor
protocol and implementations, allowing the preprocessing of data before serialization.
URLRequest
validation and error. GET
requests with body data will now produce an error.
Failure
constraint to DataResponse
and DownloadResponse
, making them DataResponse<Success, Failure: Error>
and DownloadResponse<Success, Failure: Error>
.
Session
can't be used with background URLSessionConfiguration
s. Alamofire will explicitly support such functionality at some point in the future.
AFDataResponse<Success>
and AFDownloadResponse<Success>
typealiases to help deal with the doubly generic responses.
Result
usage to use the fully qualified type instead of AFResult
.
DataRequest
and DownloadRequest
functional API, renaming flatMap
to tryMap
.
HTTPMethod
to be a struct rather than an enum.
AFError
by default. All responses will now start with an AFError
Failure
type.
NetworkReachabilityManager
to simplify and modernize its API.
Usage.md
documentation to be fully up-to-date with Alamofire 5.
Released on 2019-09-03. All issues associated with this milestone can be found using this filter.
DownloadRequest
s without producing resume data.
Released on 2019-07-29. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.
URLEncodedFormEncoder.DataEncoding
and URLEncodedFormEncoder.KeyEncoding
to customize the encoding of Data
and CodingKeys
in URLEncodedFormEncoder
.
cURLDescription
method to produce cURL
commands for Request
s which are in the process of creating their initial URLRequest
.
Request
has completed. This no longer produces an error but will instead trigger the normal Request
lifetime methods.
String
instead of nil
by URLEncodedFormEncoder
.
os_unfair_lock
to prevent rare crash.
Released on 2019-04-23. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.
ServerTrustEvaluation
logic by simplifying public key equality checks for SecKey
types.
Request.State
access to lock access and task updates using internal locking API.
DownloadRequest
where some events were being duplicated and some were missing.
Request
.
Released on 2019-04-12. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.
Request.didResumeTaskNotification
, Request.didSuspendTaskNotification
, Request.didCancelTaskNotification
, and Request.didCompleteTaskNotification
notifications.
URLSessionTask
lifetime events to EventMonitor
.
SessionStateProvider
to no longer be public
and renamed the file it lives in.
MultipartUpload
to no longer be public
.
Request
, DataRequest
, UploadRequest
, and DownloadRequest
to longer be open
, as Alamofire does not support subclassing these types.
Request
to include Notification
.
httpHeaders
extensions on URLRequest
, HTTPURLResponse
, and URLSessionConfiguration
to be headers
instead.
Request
where calling cancel()
inside a response serializer would result in the serializer running again.
Session
where the delegate precondition
would be triggered when running with a swizzled URLSessionDelegate
.
Request
where certain lifetime events could be triggered more than once by repeatedly calling resume()
, suspend()
, or cancel()
.
Released on 2019-03-29. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.
AlamofireExtended
protocol and used it to namespace all public extensions.
switch
and DispatchQueue
logic throughout codebase to simplify usage patterns.
MultipartFormData
data APIs by condensing them using optional parameters.
MultipartFormData
to support custom boundaries.
Result
type to be a new AFResult
typealias on the new Swift.Result
type in Swift 5 and removed all public extensions.
RequestInterceptor
closures where callback arguments were not marked as @escaping
.
emptyResponseAllowed
logic was not working as expected.
Released on 2019-03-27. All issues associated with this milestone can be found using this filter.
Released on 2019-01-07. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.
EmptyResponse
protocol, to allow any type to provides values to stand in for an empty response.
Request
's debugDescription
.
Package.swift
for Swift 5 support, moving Swift 4.2 support to [email protected]
.
Array
to Range
in Request
's default acceptableResponseCodes
.
RetryPolicy
to allow subclasses to override retry(_:, for: Session, dueTo:, completion:)
.
didResume
notification to didFinish
, which is now called when a Request
finished, not when tasks resume.
Request
s not finishing when their controlling Session
is deinit
d or invalidated.
validate()
due to reference cycle from implicit self
capture when using an @autoclosure
.
requestDidParseAnyResponse
when using ClosureEventMonitor
.
RetryPolicy
to properly conform to RequestInterceptor
.
Released on 2019-01-07. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.
Session
and per Request
using the RedirectHandler
protocol.
Session
and per Request
using the CachedResponseHandler
protocol.
Session
and per Request
using the RequestInterceptor
protocol.
Adapter
, Retrier
, and Interceptor
types to provide fine grained control of retry behavior.
RetryPolicy
and ConnectionLostRetryPolicy
types.
RequestRetrier
protocol to take a RetryResult
in the completion
closure allowing custom retry errors to be thrown.
Hashable
implementation on Request
to use new hash(into:)
API.