Skip to content

Commit 92f156c

Browse files
committed
Update README.md
1 parent bf04d09 commit 92f156c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ Network layer for running requests like GET, POST, PUT, DELETE etc customizable
4040
Fast-track functions return **(Data, URLResponse)** if you need to validate status code you can use check different strategies **Http.Validate.Status**
4141

4242
```swift
43-
/// - Throws: Http.Errors.status(response)
44-
public func validateStatus(
45-
_ response : URLResponse,
46-
by : [Http.Validate.Status]
47-
) throws
43+
let (data, response) = try await Http.Get.from(url)
44+
let rule : [Http.Validate.Status] = [.range(200..<300)]
45+
try validateStatus(response, by: rule)
4846
```
4947

5048
## Extended track

0 commit comments

Comments
 (0)