Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

v0.4.3

Compare
Choose a tag to compare
@dduan dduan released this 12 Nov 21:28
· 150 commits to master since this release

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