iOS: Add early resolution and conditional streaming for GET requests#108
Draft
iOS: Add early resolution and conditional streaming for GET requests#108
Conversation
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/fc9101f9-5596-43a3-ab69-ff9c48eeef06 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/fc9101f9-5596-43a3-ab69-ff9c48eeef06 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/fc9101f9-5596-43a3-ab69-ff9c48eeef06 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
…and deprecated APIs Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/fc9101f9-5596-43a3-ab69-ff9c48eeef06 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/fc9101f9-5596-43a3-ab69-ff9c48eeef06 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate iOS implementation from AFNetworking to Alamofire
Migrate iOS implementation from AFNetworking to Alamofire
Mar 29, 2026
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/99200ca0-c02e-437d-bbdc-d3c5f6f221c3 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
…wnloads Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/99200ca0-c02e-437d-bbdc-d3c5f6f221c3 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/99200ca0-c02e-437d-bbdc-d3c5f6f221c3 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/99200ca0-c02e-437d-bbdc-d3c5f6f221c3 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot
AI
changed the title
Migrate iOS implementation from AFNetworking to Alamofire
Improve iOS API with clean method names and memory-efficient streaming downloads
Mar 29, 2026
…h streaming Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/8051dbe0-1e71-4045-88d9-5e25d50ae83e Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/8051dbe0-1e71-4045-88d9-5e25d50ae83e Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot
AI
changed the title
Improve iOS API with clean method names and memory-efficient streaming downloads
Align iOS response handling with Android: load data in memory for post-request processing
Mar 29, 2026
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/07e4da87-be33-46f4-872f-e397b5e6c049 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/07e4da87-be33-46f4-872f-e397b5e6c049 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/07e4da87-be33-46f4-872f-e397b5e6c049 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/07e4da87-be33-46f4-872f-e397b5e6c049 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot
AI
changed the title
Align iOS response handling with Android: load data in memory for post-request processing
Implement streaming downloads for iOS GET requests using temp file approach
Mar 29, 2026
Copilot
AI
changed the title
Implement streaming downloads for iOS GET requests using temp file approach
iOS: Stream GET responses to temp file, preventing OOM on large downloads
Mar 29, 2026
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/7bc451f5-53da-42f8-b904-b8680baa893e Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/7bc451f5-53da-42f8-b904-b8680baa893e Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/7bc451f5-53da-42f8-b904-b8680baa893e Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot
AI
changed the title
iOS: Stream GET responses to temp file, preventing OOM on large downloads
iOS: Add early resolution for GET requests to enable header inspection and cancellation before download completes
Mar 29, 2026
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/b24160f5-a282-496c-8e1a-72b4239d4084 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/b24160f5-a282-496c-8e1a-72b4239d4084 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nativescript-community/https/sessions/b24160f5-a282-496c-8e1a-72b4239d4084 Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot
AI
changed the title
iOS: Add early resolution for GET requests to enable header inspection and cancellation before download completes
iOS: Add early resolution and conditional streaming for GET requests
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
iOS GET requests currently block until full download completes, preventing header inspection for early cancellation and forcing all responses through disk regardless of size.
Changes
New Configuration Options
Early Resolution (
earlyResolve: true)Swift: New
downloadToTempWithEarlyHeaders()method with dual callbacks:headersCallback: fires when headers arrive (NSLock synchronized)completionHandler: fires when download completesTypeScript:
HttpsResponseLegacytracks download state viadownloadCompletionPromisetoFile(),toJSON(), etc.) await completion if download in progressensureDataLoaded()into async/sync variantsConditional Streaming (
downloadSizeThreshold)Swift: New
requestWithConditionalDownload()method:DataRequestfor response fetchingTypeScript: Routes to conditional method when
downloadSizeThreshold >= 0andearlyResolveis falseBehavior Matrix
When both options set,
earlyResolvetakes precedence (requires DownloadRequest for header callback).Backward Compatibility
Default behavior unchanged. Both features require explicit opt-in.
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.