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: CLAUDE.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,11 +62,11 @@ The framework is built around two core protocols:
62
62
63
63
### Endpoint Type Hierarchy
64
64
65
-
-**`Endpoint`** - Base protocol with empty body (typically for GET requests)
66
-
-**`DataEndpoint`** - Sends raw data in body
67
-
-**`UploadEndpoint`** - Uploads files using URLSession upload
68
-
-**`MultipartEndpoint`** - Combines body parts into multipart request
69
-
-**`URLEncodedEndpoint`** - Body in URL query format
65
+
-**`Endpoint`** - Base protocol with empty body (defaults to GET)
66
+
-**`DataEndpoint`** - Sends raw data in body (defaults to POST)
67
+
-**`UploadEndpoint`** - Uploads files using URLSession upload (defaults to POST)
68
+
-**`MultipartEndpoint`** - Combines body parts into multipart request (defaults to POST)
69
+
-**`URLEncodedEndpoint`** - Body in URL query format (defaults to POST)
70
70
-**`RequestEndpoint`** - Has encodable request model (defaults to POST)
71
71
-**`ResponseEndpoint`** - Has decodable response model
72
72
-**`RequestResponseEndpoint`** - Typealias combining request and response endpoints
@@ -81,7 +81,7 @@ The framework is built around two core protocols:
81
81
82
82
**Encoding/Decoding**: The `Encoding` protocol includes `configure(request:)` for setting content-type headers (with empty default). Both `Encoding` and `Decoding` require `Sendable`.
83
83
84
-
**Swift 6 Concurrency Safety**: All `ResponseEndpoint` associated types must conform to `Sendable`.
84
+
**Swift 6 Concurrency Safety**: All `ResponseEndpoint.Response` and `RequestEndpoint.Request` associated types must conform to `Sendable`.
85
85
86
86
### Module Organization
87
87
@@ -112,8 +112,11 @@ let data = try await server.call(data: endpoint)
112
112
// Void call (no response body)
113
113
tryawait server.call(endpoint: endpoint)
114
114
115
-
// Download call
115
+
// Download call (temporary file — caller must move before returning)
116
116
let fileURL =tryawait server.download(endpoint: endpoint)
117
+
118
+
// Download call (moved to destination automatically)
0 commit comments