Created
May 27, 2016 00:51
-
-
Save nunogoncalves/3f9b54654132f6319e4c1d1652ccda06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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