Releases: Moya/Moya
11.0.2
11.0.1
11.0.0
This release brings support for ReactiveSwift 3.0
. Thank you to all the contributors making it possible! β€οΈ
Full Changelog for Moya 11.0:
Added
- Breaking Change Added a
.requestCustomJSONEncodable
case toTask
. #1443 by @evgeny-sureev. - Breaking Change Added
failsOnEmptyData
boolean support for theDecodable
map functions. #1508 by @jeroenbb94.
Changed
- Breaking Change Updated minimum version of
ReactiveSwift
to 3.0.
#1470 by @larryonoff. - Breaking Change Changed the
validate
property ofTargetType
to use newValidationType
enum representing valid status codes. #1505 by @SD10, @amaurydavid. - Breaking Change Removed generic from
Endpoint
. See #1524 for discussion. #1529 by @zhongwuzw.
11.0.0-beta.2
10.0.2
Fixed
- Fixed a bug where modifying
.uploadMultipart
,.uploadCompositeMultipart
,.uploadFile
,.downloadDestination
, and.downloadParameters
tasks through anendpointClosure
has no effect on the final request.
#1550 by @SD10, @sunshinejr. - Fixed a bug where
URLEncoding.httpBody
wasn't allowed asbodyEncoding
inTask.requestCompositeParameters()
. #1557 by @sunshinejr.
11.0.0-beta.1
This release brings full ReactiveSwift
3.0 support and minor enhancements. Thanks to all contributors that made it possible!
Added
- Breaking Change Added a
.requestCustomJSONEncodable
case toTask
. #1443 by @evgeny-sureev. - Breaking Change Added
failsOnEmptyData
boolean support for theDecodable
map functions. #1508 by @jeroenbb94.
Changed
- Breaking Change Updated minimum version of
ReactiveSwift
to 3.0.
#1470 by @larryonoff. - Breaking Change Changed the
validate
property ofTargetType
to use newValidationType
enum representing valid status codes. #1505 by @SD10, @amaurydavid.
10.0.1
Nothing better than a few bug fixes after the major release π
Fixed
- Fixed a bug that
Decodable
mapping to object other than Array and Dictionary in a key path cause crash. #1405 by @ufosky. - Fixed a bug with missing Content-Type header when using
.requestJSONEncodable
#1410 by @Vict0rS. - Fixed linker settings, enabling RxMoya and ReactiveMoya to be used in app extensions #1417 by @spookyvision.
- Fixed carthage OS X not targeting 10.10 #1444 by @lucas34.
10.0.0
Full Swift 4.0
, RxSwift 4.0
support and more! Thanks to all contributors that made it possible:
@devxoul @SD10 @LeLuckyVint @afonsograca @AndrewSB @BasThomas @pedrovereza @sunshinejr
Big β€οΈ to all of you!
Changes since 10.0.0-beta.1:
Fixed
Full changelog for Moya 10.0.0:
Added
- Breaking Change Added a
.parameterEncoding
case toMoyaError
. #1248 by @SD10. - Breaking Change Added an
.objectMapping
case toMoyaError
. #1335 by @devxoul. - Breaking Change Added an
.encodableMapping
case toMoyaError
. #1349 by @LeLuckyVint, @afonsograca and @sunshinejr. - Breaking Change Added a
.requestJSONEncodable
case toTask
. #1349 by @LeLuckyVint, @afonsograca and @sunshinejr. - Added a
Decodable
object mapping methods toMoya.Response
. #1335 by @devxoul.
Changed
- Breaking Change Changed
Endpoint.init
so it doesn't have any default arguments (removing default argument.get
formethod
parameter andnil
forhttpHeaderFields
parameter). #1289 by @sunshinejr. - Breaking Change Changed
NetworkActivityPlugin
so itsnetworkActivityClosure
has nowtarget: TargetType
argument in addition tochange: NetworkActivityChangeType
. #1290 by @sunshinejr. - Breaking Change Changed
Endpoint
'surlRequest
property tourlRequest()
a throwing method. #1248 by @SD10.
Removed
Fixed
10.0.0-beta.1
Full Swift 4.0 support and more! RxSwift 4.0.0-rc.0 needed for RxSwift 4.0. Thanks to all contributors that made it possible!
Added
- Breaking Change Added a
.parameterEncoding
case toMoyaError
. #1248 by @SD10. - Breaking Change Added an
.objectMapping
case toMoyaError
. #1335 by @devxoul. - Breaking Change Added an
.encodableMapping
case toMoyaError
. #1349 by @LeLuckyVint, @afonsograca and @sunshinejr. - Breaking Change Added a
.requestJSONEncodable
case toTask
. #1349 by @LeLuckyVint, @afonsograca and @sunshinejr. - Added a
Decodable
object mapping methods toMoya.Response
. #1335 by @devxoul.
Changed
- Breaking Change Changed
Endpoint.init
so it doesn't have any default arguments (removing default argument.get
formethod
parameter andnil
forhttpHeaderFields
parameter). #1289 by @sunshinejr. - Breaking Change Changed
NetworkActivityPlugin
so itsnetworkActivityClosure
has nowtarget: TargetType
argument in addition tochange: NetworkActivityChangeType
. #1290 by @sunshinejr. - Breaking Change Changed
Endpoint
'surlRequest
property tourlRequest()
a throwing method. #1248 by @SD10.
Removed
Fixed
9.0.0
This is a big major release and thanks to everyone involved! π π π
In this release there were two big changes:
- We deprecated reactive providers and started using
rx
andreactive
namespaces. - We removed
parameters
,parameterEncoding
and expandedtask
.
We also added Swift 4.0 support to Moya core (and preliminary for ReactiveSwift
) where support for RxSwift
will be in a next major release. We improved our test coverage from 76% up to 83%, added callbackQueue
s as an option for all requests (reactive or not!), headers
to TargetType
, improved AccessTokenPlugin
, started using Single<Response>
instead of Observable<Response>
for RxSwift normal requests and many, many more! Checkout the changelog below and have fun! π There is also a migration guide to help you make it through!
Oh, and if you find anything you are concerned about, make a new Issue - or better yet, make a PR with the fix! π
Changes since 9.0.0-beta.1:
- Removed default value for task from
Endpoint
initializer.
Full changelog for Moya 9.0.0:
- 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 Updated
TargetTypes
so it no longer receives theAuthorization: Bearer <token>
header by default when usingAccessTokenPlugin
. - 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:)
. - Breaking Change Replaced
parameters
¶meterEncoding
inTargetType
with extendedTask
cases. - Breaking Change Replaced
shouldAuthorize: Bool
inAccessTokenAuthorizable
withauthorizationType: AuthorizationType
. - Breaking Change Replaced
token
inAccessTokenPlugin
withtokenClosure
. - Breaking Change Flattened
UploadType
andDownloadType
intoTask
cases. - 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. - 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
. - Updated minimum version of
RxSwift
to3.3
. - Updated minimum version of
ReactiveSwift
to2.0
. - Fixed a bug where you would have two response events in
requestWithProgress
method onReactiveSwift
module. - Fixed a bug where you weren't notified on progress callback for data request.
- Enabled the "Allow app extension API only" flag.
- Removed default value for task from
Endpoint
initializer.