- Removed default value for task from
Endpoint
initializer
- Breaking Change Replaced
parameters
¶meterEncoding
inTargetType
with extendedTask
cases. - Breaking Change Flattened
UploadType
andDownloadType
intoTask
cases. - Breaking Change Replaced
shouldAuthorize: Bool
inAccessTokenAuthorizable
withauthorizationType: AuthorizationType
. - Breaking Change Replaced
token
inAccessTokenPlugin
withtokenClosure
. - Breaking Change
TargetTypes
no longer receive theAuthorization: Bearer <token>
header by default when usingAccessTokenPlugin
. - Added Swift 4.0 support for Moya core (without RxSwift/ReactiveSwift extensions for now).
- Added all the
filter
/map
operators that were available forObservable<Response>
toSingle<Response>
as well. - Added
AuthorizationType
toAccessTokenAuthorizable
representing request headers of.none
,.basic
, and.bearer
. - Added tests for
Single<Response>
operators. - Added
Progress
object into the response when calling progress callback on completion. - Added tests for creating
URLRequest
fromTask
. - Fixed a bug where you weren't notified on progress callback for data request.
- Breaking Change Added support to get the response (if any) from
MoyaError
. - Breaking Change Added
headers
toTargetType
. - Breaking Change Updated
RxMoyaProvider.request
to return aSingle<Request>
. - Breaking Change Updated
Moya.Response
'sresponse
to use anHTTPURLResponse
instead of aURLResponse
. - Breaking Change Renamed all occurrences of
queue
tocallbackQueue
. - Breaking Change Deprecated
ReactiveSwiftMoyaProvider
andRxSwiftMoyaProvider
. UseMoyaProvider
with reactive properties now:provider.reactive._
,provider.rx._
. In case you were subclassing reactive providers, please take a look at this PR from Eidolon. It covers migration from subclassing given providers, to usage by composition. - Breaking Change Removed parameter name in
requestWithProgress
forReactiveSwiftMoyaProvider
. - Breaking Change Removed deprecated in Moya 8.0.0:
Moya.Error
,endpointByAddingParameters(parameters:)
,endpointByAddingHttpHeaderFields(httpHeaderFields:)
,endpointByAddingParameterEncoding(newParameterEncoding:)
,endpointByAdding(parameters:httpHeaderFields:parameterEncoding)
,StructTarget
,filterStatusCodes(range:)
,filterStatusCode(code:)
,willSendRequest(request:target:)
,didReceiveResponse(result:target:)
,ReactiveCocoaMoyaProvider
,ReactiveSwiftMoyaProvider.request(token:)
. - Added optional callback queue parameter to reactive providers.
- Added public
URL(target:)
initializator that creates url fromTargetType
. - Added an optional
requestDataFormatter
inNetworkLoggerPlugin
to allow the client to interact with the request data before logging it. - Updated minimum version of
RxSwift
to3.3
. - Updated minimum version of
ReactiveSwift
to 2.0. - Fixed a bug where you would have two response events in
requestWithProgress
method onReactiveSwift
module. - Enabled the "Allow app extension API only" flag.
- Fixed a bug where you would have two response events in
requestWithProgress
method on RxMoya module.
- Bumped minimum version of ReactiveSwift to 1.1.
- Changed use of deprecated
DateSchedulerProtocol
toDateScheduler
. - Move project to using a single target for all platforms.
- Changed default endpoint creation to only append
path
tobaseURL
whenpath
is not empty.
- Fixed
reversedPrint
arguments for output. - Fixed memory leak when request with stub.
- Changed
Moya.Error
toMoyaError
inMoyaAvailablity
for Swift 3.1 compatibility.
- Changed dependency pinning to rely only on major versions.
- Fixed an issue where
RxMoyaProvider
never sendsnext
or errors if it's disposed before a subscription is made.
- 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
. - Breaking Change Renamed
adding(newHttpHeaderFields:)
toadding(newHTTPHeaderFields:)
. 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.
- 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 overridden 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
.
- Carthage support for Swift 2.3.
- Swift 2.3 support.
- Identical to 7.0.0, see #594 for an explanation.
- Breaking Change Drops support for
RACSignal
. - Breaking Change Changes
Moya.Error.Underlying
to haveNSError
instead ofErrorType
. - Breaking Change Implements inflights tracking by adding
trackInflights = true
to your provider. - Breaking Change Changes
MoyaProvider.RequestClosure
to haveResult<NSURLRequest, Moya.Error> -> Void
instead ofNSURLRequest -> Void
as adone
closure parameter. - Breaking Change New community guidelines.
- New multipart file upload.
- New cURL-based logging plugin.
- Moves from OSSpinLock to
dispatch_semaphor
to avoid deadlocks. - Integrates Danger into the repo.
- Fixes a xcodeproj referencing bug introduced by the new cURL-based logging plugin.
- Calls completion even when cancellable token is canceled
- Added
queue
parameter torequest
andsendRequest
. This open up option to use other queue instead of main queue for response callback.
- Makes
convertResponseToResult
public to make use of this method when dealing with Alamofire directly - Updates to ReactiveCocoa 4.1
- Updates to Result 2.0
- Updates for Swift 2.2 / Xcode 7.3 compatibility.
- Fixed endpoint setup when adding
parameters
orheaders
whenparameters
orheaders
or nil. - Adds StructTarget for using Moya with structs.
- Adds
response
computed property toError
type, which yields a Response object if available. - Added URLEncodedInURL to ParameterEncoding.
- Adds convenience
endpointByAdding
method. - Remove our own implementation of
ParameterEncoding
and make it apublic typealias
ofAlamofire.ParameterEncoding
.
- Updated to ReactiveCocoa 4.0 final.
- Added formatter parameter to plugin for pretty-printing response data. See #392.
- Compatibility with RxSwift 2.x.
- Compatibility with RxSwift 2.1.x.
- The built-in
DefaultAlamofireManager
as parameter's default value instead of the singletonAlamofire.Manager.sharedinstance
is now used when instantiatingReactiveCocoaMoyaProvider
andRxMoyaProvider
as well.
- Updates to ReactiveCocoa 4 RC 2.
- Breaking Change pass a built-in
DefaultAlamofireManager
as parameter's default value instead of passing the singletonAlamofire.Manager.sharedinstance
when initialize aprovider
- Fixes issue that stubbed responses still call the network.
- Updates to RXSwift 2.0.0
- Moves to use Antitypical/Result
- Update to ReactiveCocoa v4.0.0-RC.1
- Fixes cases where underlying network errors were not properly propagated.
- Moves to antitypical Result type
- Updated to RxSwift 2.0.0-beta.4
- Update to ReactiveCocoa v4.0.0-alpha.4
- Breaking Change rename
MoyaTarget
protocol toTargetType
- Breaking Change rename
MoyaRequest
protocol toRequestType
- Breaking Change rename
Plugin
protocol toPluginType
- Removes conversion from
Moya.Method
toAlamofire.Method
since it was unused - Changes
NetworkLoggingPlugin
's initializer to also take a function that has the same signature asprint
to simplify testing - Breaking Change renames
ParameterEncoding
'sparameterEncoding
method totoAlamofire
and makes it internal only - Breaking Change
Plugin<Target>
is now a protocol and as such no longer sends a typedMoyaProvider
. - @swizzlr - Breaking Change The types that were subtypes of
Moya
are now defined at the top level; you should find no compatibility issues since they are still invoked byMoya.X
– @swizzlr - Breaking Change
Completion
closure now returns aResult
instead of multiple optional parameters. - Breaking Change
MoyaResponse
is nowResponse
, and alsofinal
. It will be changed to astruct
in a future release. - @swizzlr - Breaking Change
ReactiveCocoaMoyaProvider
can now be supplied with an optionalstubScheduler
– @swizzlr (sponsored by Network Locum) - Breaking Change Introduce
Error
type for use with reactive extensions - @tomburns - Breaking Change Deprecate ReactiveCocoa 2 support
- Adds mapping methods to
MoyaResponse
- Adds tvOS and watchOS support
- Fixes carthage OS X target not having source files
- Makes base OS X target 10.9 instead of 10.10
- Updates to latest ReactiveCocoa alpha. Again.
- Updates to latest ReactiveCocoa alpha.
- Removed extraneous
SignalProducer
from ReactiveCocoa extension – @JRHeaton - Removed extraneous
deferred()
from RxSwift extension - Moved to new RxSwift syntax – @wouterw
- Updated RxSwift to latest beta – @wouterw
- OS X support.
- Fixes Carthage integration problem.
- CancellableTokens can now debug print the requests cURL.
- Plugins now subclasses NSObject for custom subclasses.
- Plugins' methods are now public, allowing custom subclasses to override.
- Updates Alamofire dependency to
~> 3.0
- Changes
mapImage()
RxSwift function to useUIImage!
instead ofUIImage
.
- Makes
parameters
onMoyaTarget
an optional[String: AnyObject]
dictionary. - Makes
parameters
andhttpHeaderFields
onEndpoint
to be optionals. - Renamed stubbing identifiers: Breaking Change
Moya.StubbedBehavior
renamed toMoya.StubBehavior
Moya.MoyaStubbedBehavior
renamed toMoya.StubClosure
Moya.NoStubbingBehavior
->Moya.NeverStub
Moya.ImmediateStubbingBehaviour
->Moya.ImmediatelyStub
Moya.DelayedStubbingBehaviour
->Moya.DelayedStub
- Default class functions have been moved to extensions to prevent inadvertent subclassing.
- Renamed other identifiers: Breaking Change
MoyaProvider.MoyaEndpointsClosure
toMoyaProvider.EndpointClosure
MoyaProvider.MoyaEndpointResolution
toMoyaProvider.RequestClosure
MoyaProvider.endpointResolver
toMoyaProvider.requestClosure
MoyaProvider.stubBehavior
toMoyaProvider.stubClosure
MoyaCredentialClosure
toCredentialClosure
MoyaProvider
initializer parameter namesMoyaCompletion
toMoya.Completion
DefaultEndpointResolution
toDefaultRequestMapping
- Renamed
T
generic types ofMoyaProvider
andEndpoint
classes toTarget
. - Removed errantly named
DefaultEndpointResolution
- Changes the closure to map
Endpoint
s toNSURLRequest
s asynchonous. - Removes inflight request tracking for ReactiveCocoa and RxSwift providers. Breaking Change
- Adds support for ReactiveCocoa 4 by moving
ReactiveCocoaMoyaProvider
to useSignalProducer
instead ofRACSignal
- Renamed
EndpointSampleResponse
cases: Breaking ChangeSuccess
toNetworkResponse
, now containsNSData
instead of() -> NSData
.Error
toNetworkError
- Additionally,
NetworkError
no longer has a status code or data associated with it. This represents an error from the underlying iOS network stack, like an inability to connect. See #200 for more details. - Also additionally, removed
Closure
case (see below).
- Changed
Endpoint
to use asampleResponseClosure
instead of asampleResponse
, making all sample responses lazily executed. Breaking Change - New plugin architecture Breaking Change
- This replaces
networkActivityClosure
with a plugin.
- This replaces
- ReactiveCocoa provider no longer replaces errors that contain status codes (an unlikely situation) with its own errors. It passes all errors directly through.
- Renames
token
totarget
(it was usuallytarget
anyway, just made it consistent).
- Corrects problem with ignoring the specified Alamofire manager
- Adds HTTP basic auth support.
- Adds data processing functions for use with
RxMoyaProvider
- Adds convenience
endpointByAddingParameterEncoding
method.
- Adds Moya files as members of RxMoya and ReactiveMoya frameworks.
- Add backward-compatible call from
DefaultEnpointResolution
toDefaultEndpointResolution
onMoyaProvider
class.DefaultEndpointResolution
is now used internally as the default resolver.DefaultEnpointResolution
can be removed in a future major release. - Carthage support.
- Add option to pass an
Alamofire.Manager
toMoyaProvider
initializer
- Updates Demo directory's RxSwift version.
- Updates Demo directory's Moya version for
pod try
compatbility.
- Breaking change Combines
MoyaPath
andMoyaTarget
protocols. - Breaking change Renames
Moya/Reactive
subspec toMoya/ReactiveCocoa
. - Breaking change Removes
stubResponses
from initializer; replaced with new stubbing behavior.NoStubbing
. Added class methods toMoyaProvider
to provide defaults, while allowing users to still change stubbing behavior on a per-request basis. - Breaking change Redefines types of
DefaultEndpointMapping
andDefaultEnpointResolution
class functions onMoyaProvider
. You no longer invoke these functions to return a closure, rather, you reference the functions themselves as closures. - Breaking change Renames
endpointsClosure
parameter and property ofMoyaProvider
toendpointClosure
. - Breaking change Renames
ReactiveMoyaProvider
toReactiveCocoaMoyaProvider
for consistency. - Fixes problem that the
ReactiveMoyaProvider
initializer would not respect the stubbing behavior it was passed. - Adds official Carthage support – @neonichu
- Relaxes version dependency on RxSwift - @alcarvalho
- Fixes possible concurrency bugs with reactive providers - @alcarvalho
- Fixes problem where
RxMoyaProvider
would not respect customized stubbing behavior (delays).
- Adds support for RxSwift – @alcarvalho
- Breaking change Changes
EndpointSampleResponse
to require closures that returnNSData
, notNSData
instances themselves. This prevents sample data from being loaded during the normal, non-unit test app lifecycle. - Breaking change Adds
method
toMoyaTarget
protocol and removesmethod
parameter fromrequest()
functions. Targets now specify GET, POST, etc on a per-target level, instead of per-request. - Breaking change Adds
parameters
toMoyaTarget
protocol and removes ability to pass parameters intorequest()
functions. Targets now specify the parameters directly on a per-target level, instead of per-request. - Adds a sane default implementation of the
MoyaProvider
initializer'sendpointsClosure
parameter.
- Updates to Swift 1.2.
- Adds cancellable requests -@MichaelMcGuire
- Adds network activity closure to provider.
- Updates podspec to refer to
3.0.0-aplha.1
of ReactiveCocoa. -@ashfurrow
- First release on CocoaPods trunk.
- Add data support for stubbed error responses. – @steam
- Fixes #66, a problem with outdated Alamofire dependency and it's serializer type signature. -@garnett
- Delete note about ReactiveCocoa installation -@garnett
- Fixes #52 to change submodules to use http instead of ssh. -@ashfurrow)
- Migrate to support Xcode beta 6.1 -@orta)
- Adds the original NSURLResponse to a MoyaResponse -@orta)
- Fixes #63, a problem where stale inflight requests were kept around if they error'd down the pipline (discussed here) -@ashfurrow
- Implements #46, the code property of the NSError sent through by ReactiveMoyaProvider will now match the failing http status code. -@powerje
- Fixes #48 that modifies Moya to execute completion blocks of stubbed responses immediately, instead of using
dispatch_async
to defer it to the next invocation of the run loop. This is a breaking change. Because of this change, the ReactiveCocoa extensions had to be modified slightly to deduplicate inflight stubbed requests. Reactive providers now vendRACSignal
instances that start the network request when subscribed to. -@ashfurrow
- Fixes #44 where status codes weren't being passed through to completion blocks. This also modified the behavior of the ReactiveCocoa extensions significantly but sending MoyaResponse objects instead of just NSData ones. —@ashfurrow
- Initial release.