Skip to content

Add support for AsyncHTTPClient#10

Merged
mattt merged 11 commits intomainfrom
mattt/async-http-client
Feb 17, 2026
Merged

Add support for AsyncHTTPClient#10
mattt merged 11 commits intomainfrom
mattt/async-http-client

Conversation

@mattt
Copy link
Copy Markdown
Owner

@mattt mattt commented Feb 17, 2026

Resolves #9

@mattt mattt marked this pull request as ready for review February 17, 2026 12:52
@mattt mattt requested a review from Copilot February 17, 2026 12:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an AsyncHTTPClient-compatible integration for Replay by introducing a lightweight HTTPClientProtocol abstraction and a ReplayHTTPClient implementation that can replay from HAR/stubs and optionally passthrough/record via a live HTTPClient.

Changes:

  • Introduce HTTPClientProtocol + ReplayHTTPClient (AsyncHTTPClient trait-gated) and conversion helpers between HTTPClientRequest/HAR/URLRequest.
  • Extend PlaybackStore with recordEntry(_:) to support recording from non-URLSession clients.
  • Add AsyncHTTPClient-focused documentation and CI/SwiftPM trait wiring (plus tests).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Sources/Replay/Replay+HTTPClient.swift Adds HTTPClientProtocol, ReplayHTTPClient, and conversion/recording glue for AsyncHTTPClient.
Sources/Replay/Playback.swift Exposes configuration internally and adds recordEntry(_:) for recording pre-built HAR entries.
Tests/ReplayTests/ReplayHTTPClientTests.swift Adds tests for stub/entry replay and conversion helpers under canImport(AsyncHTTPClient).
README.md Documents enabling the AsyncHTTPClient trait and using HTTPClientProtocol/ReplayHTTPClient.
Package.swift Adds AsyncHTTPClient trait and conditional product dependency on AsyncHTTPClient.
Package.resolved Locks new transitive dependencies from async-http-client.
.github/workflows/ci.yml Updates CI build/test commands to enable the AsyncHTTPClient trait.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mattt mattt merged commit 9b84917 into main Feb 17, 2026
8 checks passed
@mattt mattt deleted the mattt/async-http-client branch February 17, 2026 14:26
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.

Add support for AsyncHTTPClient

2 participants