File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Sources/async-http-client Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ public extension Http{
192192 config. getSession
193193 )
194194
195- try validateStatus ( response, by : validate. filterStatus ( ) )
195+ try validateStatus ( response, by : validate. pickStatusRules ( ) )
196196
197197 let value : T = try reader. read ( data: data)
198198
Original file line number Diff line number Diff line change @@ -9,17 +9,17 @@ import Foundation
99
1010public extension Http {
1111
12- /// Set of validate rules for Http client
12+ /// Set of rules for validating Http client
1313 enum Validate {
14- /// Set of validate rules for HTTPURLResponse.statusCode
14+ /// Set of rules for validating HTTPURLResponse.statusCode
1515 case status( Status )
1616 }
1717}
1818
1919internal extension Http . Validate {
2020
2121 /// Pick up status validate rule
22- var isStatus : Status {
22+ var pickStatusRule : Status {
2323 switch ( self ) {
2424 case . status( let rule) : return rule
2525 }
@@ -29,10 +29,10 @@ internal extension Http.Validate{
2929
3030internal extension Collection where Element == Http . Validate {
3131
32- /// Pick up status validate rules
33- /// - Returns: Set of fn to validate status
34- func filterStatus ( ) -> [ Http . Validate . Status ] {
35- map { $0. isStatus }
32+ /// Pick up rules for validating HTTPURLResponse.statusCode
33+ /// - Returns: Collection of rules for validating statusCode
34+ func pickStatusRules ( ) -> [ Http . Validate . Status ] {
35+ map { $0. pickStatusRule }
3636 }
3737}
3838
You can’t perform that action at this time.
0 commit comments