swift-server / swift-server/async-http-client
Remove dependency on Foundation?
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
AsyncHTTPClient is currently dependent on Foundation. Would removing this dependency be a target for AHC?
I have done a quick test to see where Foundation is being used. The main source is unsurprisingly URL. The other two are Date/DateFormatter which might be difficult to replace but are used in one very specific place (Cookie expiry dates) and Data which is used in StreamWriter.data and in Authorization.basic where a string is converted to Data to convert it to base64.
To still allow interface functions that use Foundation types they could be moved out to a AsyncHTTPClientFoundationCompat library à la swift-nio. The implementation of HTTPClient functions that take a URL could be moved there along with StreamWriter.data.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Foundation uses named in the issue: URL, Date/DateFormatter for cookie expiry, and Data in StreamWriter.data and Authorization.basic. Review the proposed AsyncHTTPClientFoundationCompat boundary and determine the concrete scope and acceptance criteria for removing the dependency; the issue does not currently define what done looks like.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100