Add static vars for common HTTP versions (#1723)

Motivation:

I'm sick of typing `.init(major: 1, minor: 1)`.

Modifications:

- Added static vars for common HTTP versions.

Result:

Maybe I'll never type `.init(major: 1, minor: 1)` ever again.
This commit is contained in:
Cory Benfield authored and GitHub committed 2021-01-19 17:27:02 +00:00
1 parent 2b821b2ef6
commit 8ea768b0b8
26 files changed
+153 -139

No files matched your search

@@ -166,7 +166,7 @@ extension NIOSingleStepByteToMessageDecoder {
/// headers.add(name: "content-length", value: String(responseBuffer.readableBytes))
///
/// context.write(self.wrapOutboundOut(HTTPServerResponsePart.head(
/// HTTPResponseHead(version: .init(major: 1, minor: 1),
/// HTTPResponseHead(version: .http1_1,
/// status: .ok, headers: headers))), promise: nil)
///
/// context.write(self.wrapOutboundOut(HTTPServerResponsePart.body(