25 Commits
Author SHA1 Message Date
Guoye Zhang 141600d7e6 Adopt availability macros (#127) 2026-06-22 15:16:29 -07:00
Guoye Zhang f14fbc0e56 Add FoundationURL trait (#118)
Add a default enabled trait "FoundationURL" that can be disabled for
users who don't want Foundation dependencies. Also enable
`InternalImportsByDefault`.
2026-06-01 11:57:33 -07:00
Rick Newton-RogersandGuoye Zhang c98018204b Drop Swift 6.0 (#114)
Motivation:

Swift 6.0 is no longer supported, we should bump the tools version and
remove it from our CI.

Modifications:

* Bump the Swift tools version to Swift 6.1
* Remove Swift 6.0 jobs where appropriate in main.yml, pull_request.yml

Result:

Code reflects our support window.

---------

Co-authored-by: Guoye Zhang <guoye_zhang@apple.com>
2026-04-01 21:51:13 +01:00
Guoye Zhang 3acdb1c8e8 Move HTTPRequest.url to the main library (#79)
Resolves #76
2025-10-17 07:51:03 +01:00
Guoye ZhangandCory Benfield 9c9d5ea7e3 Convert WebSocket URLRequest to RFC8441 HTTPRequest (#92)
WebSocket uses the extended-CONNECT form in HTTP/2 and HTTP/3. When
creating an HTTPRequest from a URLRequest, we should translate it into
the new form.

`:method`: `GET` -> `CONNECT`
`:scheme`: `wss`/`ws` -> `https`/`http`
`:protocol`: `websocket`

HTTPTypes defaults to modern HTTP versions, and the expectation is that
the HTTP/1 serializer has to translate the extended-CONNECT request back
to the old request form.

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
2025-10-05 11:13:17 -07:00
Guoye Zhang 40ca463b5f Request.url should return nil for situations where it is not applicable (#84)
Regular CONNECT requests and OPTIONS * requests do not have URLs
2025-01-29 07:10:41 +00:00
Guoye Zhang 74e4995e39 Support building without CoreFoundation on Windows 2024-10-28 17:16:02 -07:00
Franz Busch 95045b96be Revert "Change compiler checks"
This reverts commit 310e8eaf92.
2024-10-25 10:51:29 +02:00
Franz Busch 310e8eaf92 Change compiler checks 2024-10-24 22:30:18 +02:00
Franz Busch f3d9ec3eef [CI] Make all CI checks green
# Motivation

We just adopted GH actions and want to make sure all the CI checks are green.

# Modification

This PR makes the necessary changes to pass all checks. Including:

- Adding a licenseignore file
- Moving `swift-format` and adopting the config that we use in all other swift on server repos.

# Result

Green CI.
2024-10-24 22:30:18 +02:00
zunda 03eab5b69c remove #if for old platform 2024-07-16 11:44:23 +09:00
zunda 123410433b add #if os for bytes function 2024-07-16 11:32:51 +09:00
zunda 4b41fd0a3a remove #if for bytes function 2024-07-16 11:30:17 +09:00
zunda 5caa54337a support swift 6 concurrency URLSession method 2024-07-15 07:19:26 +09:00
Max Desiatov a114507558 Fix building for WASI 2024-01-11 17:16:25 +00:00
Guoye Zhang 165e7ecdd3 Remove @_implementationOnly 2023-11-14 18:31:27 -08:00
Guoye Zhang 4b54b0f292 Fix relative URL 2023-07-22 20:19:25 -07:00
Guoye Zhang 79ea5d0bc5 Update format and contributors 2023-07-14 16:03:19 -07:00
Guoye Zhang a489393bc9 Merge main into format 2023-07-14 16:01:05 -07:00
Guoye Zhang f610691a14 Code formatting fixes
Adding additional self. missed by SwiftFormat
2023-07-12 16:44:56 -07:00
Sergey Dmitriev 19a1dbe1b5 Support URLSession.data(for:), URLSession.upload(for:from:) and URLSesion.upload(for:fromFile:) 2023-07-11 16:02:41 +03:00
Guoye Zhang 9ff7d8f4d6 Use fallback functions 2023-07-09 03:39:53 -07:00
Guoye Zhang 885b94bd13 Reduce Swift version requirement to 5.7 2023-07-06 22:52:11 -07:00
Guoye Zhang ae848811f9 Internal API review feedback 2023-06-30 10:06:35 -07:00
Guoye Zhang c164739694 Import code 2023-06-30 10:06:35 -07:00