This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
Releases: dduan/Just
Releases · dduan/Just
0.5.0
v0.4.8
v0.4.6
v0.4.5
v0.4.4
Added option to customize credential persistence through JustSessionDefaults
(default value is .ForSession
):
let defaults = JustSessionDefaults(credentialPersistence: .None)
let just = JustOf<HTTP>(defaults: defaults)
just.post("http://httpbin.org/post", auth: ("B3rry": "A113n")) // credential will not persist at all.
Read the customization section in quick start guide to learn more!
v0.4.3
This version made JustSessionDefaults
public so that you can create your own Just sessions with one. For example, the following code creates a session that includes an Authorization header for all requests:
let defaults = JustSessionDefaults(headers: ["Authorization": "\(someAuthKey)"])
let just = JustOf<HTTP>(defaults: defaults)
just.post("http://httpbin.org/post") // this request will contain the Authorization header
v0.4.2
This build contains some project housekeeping.
Probably more interesting notes from v0.4:
HTTPResult
now retains reference to its NSURLSessionTask.- as a consequence, you can call
HTTPResult.cancel()
, which just forwards toHTTPResult.task?.cancel()
- The type of
json
argument got relaxed toAnyObject
, so that arrays can be passed in. - Added tvOS target.
v0.4.1
This build contains some project housekeeping.
Probably more interesting notes from v0.4:
HTTPResult
now retains reference to its NSURLSessionTask.- as a consequence, you can call
HTTPResult.cancel()
, which just forwards toHTTPResult.task?.cancel()
- The type of
json
argument got relaxed toAnyObject
, so that arrays can be passed in. - Added tvOS target.
v0.4
v0.3
Just now supports Link Headers. It also gained an adaptor structure internally.