@@ -19,7 +19,7 @@ public protocol HTTPServer {
19
19
///
20
20
/// - Returns the base URL for this endpoint.
21
21
@discardableResult
22
- func serve( at endpoint: HTTPServerEndpoint ,
22
+ func serve( at endpoint: HTTPServerEndpoint ,
23
23
handler: @escaping ( HTTPServerRequest ) -> Resource ) throws -> URL
24
24
25
25
/// Serves resources at the given `endpoint`.
@@ -30,7 +30,7 @@ public protocol HTTPServer {
30
30
///
31
31
/// - Returns the base URL for this endpoint.
32
32
@discardableResult
33
- func serve( at endpoint: HTTPServerEndpoint ,
33
+ func serve( at endpoint: HTTPServerEndpoint ,
34
34
handler: @escaping ( HTTPServerRequest ) -> Resource ,
35
35
failureHandler: FailureHandler ? ) throws -> URL
36
36
@@ -45,8 +45,10 @@ public protocol HTTPServer {
45
45
46
46
public extension HTTPServer {
47
47
@discardableResult
48
- func serve( at endpoint: HTTPServerEndpoint ,
49
- handler: @escaping ( HTTPServerRequest ) -> Resource ) throws -> URL {
48
+ func serve(
49
+ at endpoint: HTTPServerEndpoint ,
50
+ handler: @escaping ( HTTPServerRequest ) -> Resource
51
+ ) throws -> URL {
50
52
try serve ( at: endpoint, handler: handler, failureHandler: nil )
51
53
}
52
54
@@ -89,7 +91,7 @@ public extension HTTPServer {
89
91
)
90
92
}
91
93
92
- return try serve ( at: endpoint,
94
+ return try serve ( at: endpoint,
93
95
handler: handler ( request: ) ,
94
96
failureHandler: failureHandler)
95
97
}
@@ -125,7 +127,6 @@ public extension HTTPServer {
125
127
)
126
128
}
127
129
128
-
129
130
return publication. get ( href)
130
131
}
131
132
0 commit comments