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: docs/ALAMOFIRE_MIGRATION.md
+30-29Lines changed: 30 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,52 +120,53 @@ All features from the AFNetworking implementation have been preserved and enhanc
120
120
- JSON deserialization
121
121
- Raw data responses
122
122
- Image conversion (UIImage)
123
-
- File saving
124
-
-**NEW: Streaming downloads** for memory-efficient large file handling
123
+
- File saving via `.toFile()` method
125
124
- Error handling with status codes
126
125
127
-
## New Features
126
+
**Behavior:** Response data is loaded into memory as NSData (matching Android OkHttp). Users inspect status code and headers, then decide to call `.toFile()`, `.toArrayBuffer()`, etc.
128
127
129
-
### Streaming Downloads
130
-
The new `downloadFilePath` option enables memory-efficient downloads by streaming directly to disk:
128
+
## API Improvements
129
+
130
+
### Cleaner API Methods
131
+
All Swift wrapper methods now use simplified, more intuitive names:
132
+
-`request()` instead of `dataTaskWithHTTPMethod...`
133
+
-`uploadMultipart()` instead of `POSTParametersHeaders...`
134
+
-`uploadFile()` instead of `uploadTaskWithRequestFromFile...`
135
+
-`uploadData()` instead of `uploadTaskWithRequestFromData...`
- Better performance on memory-constrained devices
156
-
- Progress tracking during download
157
-
- Automatic file path creation
158
-
159
-
### Cleaner API Methods
160
-
All Swift wrapper methods now use simplified, more intuitive names:
161
-
-`request()` instead of `dataTaskWithHTTPMethod...`
162
-
-`uploadMultipart()` instead of `POSTParametersHeaders...`
163
-
-`uploadFile()` instead of `uploadTaskWithRequestFromFile...`
164
-
-`uploadData()` instead of `uploadTaskWithRequestFromData...`
161
+
**Benefits:**
162
+
- Same behavior on iOS and Android
163
+
- Inspect status/headers before processing data
164
+
- Flexible response handling
165
+
- Simple, predictable API
165
166
166
167
## API Compatibility
167
168
168
-
The TypeScript API remains **100% compatible** with the previous AFNetworking implementation. No changes are required in application code that uses this plugin. New features are opt-in through additional options.
169
+
The TypeScript API remains **100% compatible** with the previous AFNetworking implementation. No changes are required in application code that uses this plugin.
0 commit comments