- Breaking Change Renamed
Moya.Error
toMoyaError
. - Breaking Change Renamed
verbose
in the NetworkLoggerPlugin toisVerbose
. - Breaking Change
TargetType
now specifies itsParameterEncoding
. - Breaking Change Removed unused
Moya.Error.data
. Moya.Error
now conforms toLocalizedError
protocol.- Added documentation for
TargetType
and associated data structures. - Re-add
MultiTarget
to project. - Adopted an SPM-compatible project structure.
- Moved tests to Moya.xcodeproj.
- Supported the Swift package manager
- Added
AccessTokenPlugin
for easier authorization. - Added
AccessTokenAuthorizable
protocol for optionally controlling the authorization behavior ofTargetType
s when usingAccessTokenPlugin
. - Added availability tags for renamed functions included in the Swift 3 migration.
And in earlier beta's, we changed the following:
- Breaking Change Renamed
ReactiveCocoaMoyaProvider
toReactiveSwiftMoyaProvider
. - Breaking Change Renamed
PluginType
functions to comply with Swift 3 design guideline:willSendRequest
renamed towillSend
.didReceiveResponse
renamed todidReceive
.
- Breaking Change Renamed
filterStatusCodes(:)
tofilter(statusCodes:)
(andfilterStatusCode(:)
tofilter(statusCode:)
). - Breaking Change Renamed
request(token:)
to simplyrequest(:_)
(ReactiveSwift). - Breaking Change Renamed
notifyPluginsOfImpendingStub(request:)
tonotifyPluginsOfImpendingStub(for:)
. - Renamed the
ReactiveCocoa
subspec toReactiveSwift
. PluginType
can now modify requests and responses throughprepare
andprocess
- Breaking Change Renamed
cancelled
in theCancellable
protocol toisCancelled
. - Breaking Change Renamed
URL
inEndpoint
tourl
. - Breaking Change Renamed
StructTarget
toMultiTarget
. - Demo project has been updated with new DemoMultiTarget target, new project
structure and more. - Readded support for iOS 8 and macOS 10.10.
- Added validate option in
TargetType
, to allow enabling Alamofire automatic validation on requests. - Added
mapString(atKeyPath:)
toResponse
,SignalProducerProtocol
, andObservableType
. - Breaking Change Made some
class func
s mimicking enum cases lowercased. - Updates for RxSwift 3.0 final release.
- Added default empty implementation for
willSendRequest
anddidReceiveResponse
inPluginType
. - Use
String(data:encoding:)
instead ofNSString(data:encoding:)
while convertingData
toString
. - Breaking Change Throw dedicated
Error.jsonMapping
whenmapJSON
fails to parse JSON. - Breaking Change Renamed
endpointByAddingHTTPHeaders
toadding(newHttpHeaderFields:)
. - Breaking Change Renamed
endpointByAddingParameters
toadding(newParameters:)
. - Breaking Change Renamed
endpointByAddingParameterEncoding
toadding(newParameterEncoding:)
. - Breaking Change Renamed
endpointByAdding(parameters:httpHeaderFields:parameterEncoding)
toadding(parameters:httpHeaderFields:parameterEncoding)
. - Breaking Change Changed HTTP verbs enum to lowercase.
urlRequest
property ofEndpoint
is now truly optional. The request will fail if theurlRequest
turns out to be nil and arequestMapping
error will be returned together with the problematic url.- Breaking Change Made RxMoya & ReactiveMoya frameworks dependant on Moya framework, making them slimmer and not re-including Moya source in the Reactive extensions. (PR)
- Removed the unused
StreamRequest
typealias that was causing watchOS failures. - Fixes download requests never calling the completion block.
- Added a new internal Requestable protocol.
- Added a new case to
SampleResponseClosure
which allows mocking of the wholeURLResponse
. - Added a test for new
SampleResponseClosure
case. - Breaking Change Transition from ReactiveCocoa to ReactiveSwift. (PR)
- Breaking Change Support for
Swift 3
in favor ofSwift 2.x
. - Breaking Change
fileName
andmimeType
are now optional properties on a MultipartFormData object. - Correct Alamofire
appendBodyPart
method id called in MultipartFormData. - Breaking Change Removes
multipartBody
from TargetType protocol and adds atask
instead. - Breaking Change Successful Response instances that have no data with them are now being converted to
.Success
Result
s. - Adds Download and Upload Task type support to Moya.
- Corrects SwiftLint warnings.
- Separates
Moya.swift
into multiple files. - Updated
mapJSON
API to include an optional named parameterfailsOnEmptyData:
that when overriden returns an emptyNSNull()
result instead of throwing an error when the response data is empty. - Added
supportsMultipart
to theMethod
type, which helps determine whether to usemultipart/form-data
encoding. - Added
PATCH
andCONNECT
to theMethod
cases which support multipart encoding. - Added
request
forResponse
.