Browse Source

Update acceptableStatusCodes to a Range (#2720)

* Changed array to range

* test

* close #2719
StevenArmandLee 6 years ago
parent
commit
5fe7897b8e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Validation.swift

+ 1 - 1
Source/Validation.swift

@@ -67,7 +67,7 @@ extension Request {
 
     // MARK: Properties
 
-    fileprivate var acceptableStatusCodes: [Int] { return Array(200..<300) }
+    fileprivate var acceptableStatusCodes: Range<Int> { return 200..<300 }
 
     fileprivate var acceptableContentTypes: [String] {
         if let accept = request?.value(forHTTPHeaderField: "Accept") {