You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ Network layer for creating different requests like GET, POST, PUT, DELETE etc cu
7
7
8
8
## Features
9
9
-[x] Multiplatform
10
+
-[x] Set up amount of attempts if request fails with "Exponential backoff strategy". Exponential backoff is a strategy in which you increase the delays between retries.
10
11
-[x] Stand alone package without any dependencies using just Apple's facilities
11
12
-[x] Customizable for different requests schemes from classic **CRUD Rest** to what suits to you
12
13
-[x] Customizable in term of session
@@ -29,6 +30,11 @@ Network layer for creating different requests like GET, POST, PUT, DELETE etc cu
29
30
tryawait http.get(path: "users")
30
31
```
31
32
33
+
### GET with retry
34
+
```swift
35
+
tryawait http.get(path: "users", retry : 5)
36
+
```
37
+
32
38
### POST
33
39
```swift
34
40
tryawait http.post(
@@ -56,10 +62,14 @@ Network layer for creating different requests like GET, POST, PUT, DELETE etc cu
56
62
### Custom request
57
63
58
64
```swift
59
-
publicfuncsend<T>(
60
-
withrequest : URLRequest,
61
-
_taskDelegate: ITaskDelegate?=nil) asyncthrows
62
-
-> Http.Response<T>where T : Decodable
65
+
/// - Parameters:
66
+
/// - request: A URL load request that is independent of protocol or URL scheme
67
+
/// - retry: Amount of attempts Default value is 1
68
+
/// - taskDelegate: A protocol that defines methods that URL session instances call on their delegates to handle task-level events
0 commit comments