Skip to content

Commit efa2bea

Browse files
committed
Document HTTPHeadersExtractor/Injector 📖
1 parent 67714a4 commit efa2bea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/NIOInstrumentation/HTTPHeadersCarrier.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
import Instrumentation
1515
import NIOHTTP1
1616

17+
/// Extracts header values from `NIOHTTP1.HTTPHeaders`.
18+
///
19+
/// If multiple entries exist for a given key, their values will be joined according to
20+
/// [HTTP RFC 7230: Field Order](https://httpwg.org/specs/rfc7230.html#rfc.section.3.2.2), returning a comma-separated list
21+
/// of the values.
1722
public struct HTTPHeadersExtractor: ExtractorProtocol {
1823
public init() {}
1924

@@ -26,6 +31,7 @@ public struct HTTPHeadersExtractor: ExtractorProtocol {
2631
}
2732
}
2833

34+
/// Injects values into `NIOHTTP1.HTTPHeaders`.
2935
public struct HTTPHeadersInjector: InjectorProtocol {
3036
public init() {}
3137

0 commit comments

Comments
 (0)