Releases: ishkawa/APIKit
Releases · ishkawa/APIKit
1.0.0 beta.13
- Follow the latest version of Result (0.6.0-beta.6).
1.0.0 beta.12
Update dependency to fix installing via Carthage. #97
1.0.0 beta.11
- Built in Swift 2.1.
- Avoid calling
parameters
inRequestType
. #95
1.0.0 beta.10
- Make
RequestType.parseData()
public.
1.0.0 beta.9
Breaking Changes
API
is renamed toSession
(#86). An instance ofSession
has an instance ofNSURLSession
. If you want to enqueue a request to specificNSURLSession
, instantiateSession
with theNSURLSession
and call its instance methods. Type methods ofSession
use the default instanceSession.sharedSession
.
New code for sending requests looks like below:
let request = /* create a request */
Session.sendRequest(request) { result in
// handle result
}
To enqueue a request into specific NSURLSession
:
let session = Session(URLSession: /* NSURLSession instance here */)
let request = /* create a request */
session.sendRequest(request) { result in
// handle result
}
1.0.0 beta.8
- Handle NSNull in
RequestType.parameters
as a nullable value. If you want to preserve a key and express absence of value, specifyNSNull()
for the value of the key. #84
1.0.0 beta.7
NSURLRequest
instance ofRequestType
is now available frombuildURLRequest()
method. #78Change type ofThis change is reverted by #84 in 1.0.0-beta.8. If you want to pass nullable value to parameters, use NSNull. Both NSJSONSerialization and URLEncodedSerialization handle it.RequestType.parameters
from[String: AnyObject]
to[String: AnyObject?]
. Now, parameter can contain nullable values and it will be encoded correctly both in JSON and URL encoding. #83
Breaking Changes
Request
protocol is renamed asRequestType
for consistency with the Swift standard library. #82
1.0.0 beta.6
1.0.0 beta5
1.0.0 beta4
- Swift 2 beta 6