Created
January 6, 2015 23:04
-
-
Save boek/0fa8e14d08adeec5dba4 to your computer and use it in GitHub Desktop.
This file contains 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 HTTPHandlerType { | |
typealias Data | |
/// :returns: true if the request was handled; false otherwise | |
func handle(request: HTTPRequest, data: Data) -> Bool | |
func foo(request: HTTPRequest, data: Data) -> Bool | |
} | |
class MyHandler : HTTPHandlerType { | |
func handle(request: HTTPRequest, data: Int) -> Bool { | |
return data > 5 | |
} | |
func foo(request: HTTPRequest, data: String) -> Bool { | |
return data == "" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment