This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension URLSession.DataTaskPublisher { | |
func tryFilter(httpStatusCode: Int) -> Publishers.TryFilter<Self> { | |
tryFilter(httpStatusCodes: httpStatusCode..<httpStatusCode+1) | |
} | |
func tryFilter(httpStatusCodes: Range<Int>) -> Publishers.TryFilter<Self> { | |
tryFilter(httpStatusCodes: ClosedRange(httpStatusCodes)) | |
} | |
func tryFilter(httpStatusCodes: ClosedRange<Int>) -> Publishers.TryFilter<Self> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am mackarous on github. | |
* I am mackarous (https://keybase.io/mackarous) on keybase. | |
* I have a public key ASCA_AtuoQJvbX7n_9mj2UlKutePRnEjs06HZByIbcRAAgo | |
To claim this, I am signing this object: |