Skip to content

feat(http-request): add stream option and download response metadata#151

Merged
jdalton merged 1 commit intomainfrom
feat/http-download-response-metadata
Apr 6, 2026
Merged

feat(http-request): add stream option and download response metadata#151
jdalton merged 1 commit intomainfrom
feat/http-download-response-metadata

Conversation

@jdalton
Copy link
Copy Markdown
Collaborator

@jdalton jdalton commented Apr 6, 2026

Summary

  • Add stream option on httpRequest — resolves with HttpResponse immediately after headers arrive, leaving rawResponse unconsumed for piping to files
  • Add headers, ok, status, statusText fields on HttpDownloadResult
  • Refactor httpDownload to use httpRequest with stream: true internally, eliminating ~120 lines of duplicated HTTP plumbing

Test plan

  • 210 http-request tests pass (13 new for stream + metadata)
  • Build, lint, typecheck clean

@jdalton jdalton force-pushed the feat/http-download-response-metadata branch 3 times, most recently from 5b65888 to e0c924a Compare April 6, 2026 22:10
@jdalton jdalton changed the title feat(http-request): add stream option and response metadata to downloads feat(http-request): add stream option and download response metadata Apr 6, 2026
@jdalton jdalton mentioned this pull request Apr 6, 2026
Add stream option to httpRequest — resolves with HttpResponse immediately
after headers arrive, leaving rawResponse unconsumed for piping to files.

Refactor httpDownloadAttempt to use httpRequestAttempt with stream: true,
eliminating ~120 lines of duplicated HTTP plumbing (redirect handling,
protocol selection, error enrichment).

Add headers, ok, status, and statusText to HttpDownloadResult so callers
can inspect response metadata after streaming downloads.
@jdalton jdalton force-pushed the feat/http-download-response-metadata branch from e0c924a to bb226c3 Compare April 6, 2026 22:14
@jdalton jdalton merged commit f14f1fb into main Apr 6, 2026
12 checks passed
@jdalton jdalton deleted the feat/http-download-response-metadata branch April 6, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant