Skip to content

Instantly share code, notes, and snippets.

@nunogoncalves
Created May 27, 2016 00:51
Show Gist options
  • Save nunogoncalves/3f9b54654132f6319e4c1d1652ccda06 to your computer and use it in GitHub Desktop.
Save nunogoncalves/3f9b54654132f6319e4c1d1652ccda06 to your computer and use it in GitHub Desktop.
protocol Authenticable {
var headers: HeadParams? {
get
}
func fillHeaders()
}
extension Authenticable {
var headers: HeadParams? {
return ["Authorization" : "Bearer \(CurrentUser.accessToken ?? "")"]
}
func fillHeaders() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment