Skip to content

Commit

Permalink
Implementing HTTPVersion static variables
Browse files Browse the repository at this point in the history
  • Loading branch information
amosavian committed Nov 16, 2017
1 parent 4eab465 commit 657938b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Sources/HTTP/HTTPVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ public struct HTTPVersion {
}
}

extension HTTPVersion {
/// HTTP version 1.0
public static let v1_0 = HTTPVersion(major: 1, minor: 0)

/// HTTP version 1.1
public static let v1_1 = HTTPVersion(major: 1, minor: 1)

/// HTTP version 2.0
public static let v2_0 = HTTPVersion(major: 2, minor: 0)
}

extension HTTPVersion: Hashable {
/// :nodoc:
public var hashValue: Int {
Expand Down

0 comments on commit 657938b

Please sign in to comment.