Skip to content

Commit c9adfcc

Browse files
committed
Add docs
1 parent 30813b5 commit c9adfcc

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
/// A protocol that defines the context for an HTTP request.
2+
///
3+
/// Conforming types represent contextual information that can be associated with
4+
/// an HTTP request throughout its lifecycle.
15
public protocol HTTPRequestContext: Sendable {
26

37
}
48

5-
9+
/// The default implementation of an ``HTTPRequestContext`` for HTTP server requests.
10+
///
11+
/// This struct provides a concrete type for representing the context of HTTP requests
12+
/// handled by a server.
613
public struct HTTPServerRequestContext: HTTPRequestContext {
14+
/// Creates a new HTTP server request context.
715
public init() {}
816
}

Sources/HTTPServer/HTTPServerClosureRequestHandler.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public struct HTTPServerClosureRequestHandler<
6161
///
6262
/// - Parameters:
6363
/// - request: The HTTP request headers and metadata.
64+
/// - requestContext: The request's context.
6465
/// - requestBodyAndTrailers: A reader for accessing the request body data and trailing headers.
6566
/// - responseSender: An ``HTTPResponseSender`` to send the HTTP response.
6667
public func handle(

0 commit comments

Comments
 (0)