Skip to content

Commit f1496bc

Browse files
committed
Update claude.md
1 parent b9d37e9 commit f1496bc

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

CLAUDE.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ The framework is built around two core protocols:
6262

6363
### Endpoint Type Hierarchy
6464

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)
7070
- **`RequestEndpoint`** - Has encodable request model (defaults to POST)
7171
- **`ResponseEndpoint`** - Has decodable response model
7272
- **`RequestResponseEndpoint`** - Typealias combining request and response endpoints
@@ -81,7 +81,7 @@ The framework is built around two core protocols:
8181

8282
**Encoding/Decoding**: The `Encoding` protocol includes `configure(request:)` for setting content-type headers (with empty default). Both `Encoding` and `Decoding` require `Sendable`.
8383

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`.
8585

8686
### Module Organization
8787

@@ -112,8 +112,11 @@ let data = try await server.call(data: endpoint)
112112
// Void call (no response body)
113113
try await server.call(endpoint: endpoint)
114114

115-
// Download call
115+
// Download call (temporary file — caller must move before returning)
116116
let fileURL = try await server.download(endpoint: endpoint)
117+
118+
// Download call (moved to destination automatically)
119+
try await server.download(endpoint: endpoint, destination: destinationURL)
117120
```
118121

119122
### Error Handling

0 commit comments

Comments
 (0)