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
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The package come with 2 modules:
28
28
29
29
### Building a request
30
30
31
-
You make requests by creating `Request` objects. You can either create them manually or provide static definition by extending `Request`:
31
+
You make requests by creating [`Request`](https://pjechris.github.io/SimpleHTTP/Structs/Request.html) objects. You can either create them manually or provide static definition by extending `Request`:
32
32
33
33
```swift
34
34
extensionRequest {
@@ -44,7 +44,7 @@ This defines a `Request.login(_:)` method which create a request targeting "logi
44
44
45
45
You can use your request along `URLSession` by converting it into a `URLRequest` by calling `request.toURLRequest(encoder:relativeTo:accepting)`.
46
46
47
-
You can also use a `Session` object. `Session` is somewhat similar to `URLSession` but providing additional functionalities:
47
+
You can also use a `Session` object. [`Session`](https://pjechris.github.io/SimpleHTTP/Classes/Session.html) is somewhat similar to `URLSession` but providing additional functionalities:
48
48
49
49
- encoder/decoder for all requests
50
50
- error handling
@@ -91,7 +91,7 @@ extension Request {
91
91
92
92
### Multipart
93
93
94
-
You can create multipart content from two kind of content
94
+
You can create [multipart](https://pjechris.github.io/SimpleHTTP/Structs/MultipartFormData.html) content from two kind of content
95
95
96
96
- From a disk file (using a `URL`)
97
97
- From raw content (using `Data`)
@@ -160,14 +160,14 @@ When using Session you can add automatic behavior to your requests/responses usi
160
160
161
161
### `RequestInterceptor`
162
162
163
-
`RequestInterceptor` allows to adapt and/or retry a request:
163
+
[`RequestInterceptor`](https://pjechris.github.io/SimpleHTTP/Protocols/RequestInterceptor.html) allows to adapt and/or retry a request:
164
164
165
165
-`adaptRequest` method is called before making a request allowing you to transform it adding headers, changing path, ...
166
166
-`rescueRequestError` is called whenever the request fail. You'll have a chance to retry the request. This can be used to re-authenticate the user for instance
167
167
168
168
### `ResponseInterceptor`
169
169
170
-
`ResponseInterceptor` is dedicated to intercept and server responses:
170
+
[`ResponseInterceptor`](https://pjechris.github.io/SimpleHTTP/Protocols/ResponseInterceptor.html) is dedicated to intercept and server responses:
171
171
172
172
-`adaptResponse` change the server output
173
173
-`receivedResponse` notify about the server final response (a valid output or error)
0 commit comments