File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 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.
15public 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.
613public struct HTTPServerRequestContext : HTTPRequestContext {
14+ /// Creates a new HTTP server request context.
715 public init ( ) { }
816}
Original file line number Diff line number Diff 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(
You can’t perform that action at this time.
0 commit comments