• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-swift / 25054157007

28 Apr 2026 12:57PM UTC coverage: 80.858% (-0.6%) from 81.408%
25054157007

Pull #917

github

grdsdev
feat(functions): functions v3 (#923)

* feat(helpers): add _HTTPClient with RequestBody and separate query/body params

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(helpers): add TokenProvider support to _HTTPClient

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(helpers): stream UInt8 bytes instead of single-byte Data chunks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(functions): migrate to _HTTPClient, remove old HTTP layer from Functions

- Replace HTTPClientType/HTTPClient/FetchHandler with _HTTPClient
- FunctionInvokeOptions.headers and query now use [String: String]
- _invokeWithStreamedResponse is now async throws
- SupabaseClient passes session + tokenProvider to FunctionsClient
- Remove RequestTests.swift (covered by inline snapshots in FunctionsClientTests)
- Add package access modifiers to _HTTPClient types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(functions): convert FunctionsClient to actor, simplify streaming API

- Convert FunctionsClient from Sendable class with LockIsolated to actor
- Replace _invokeWithStreamedResponse (URLSessionDataDelegate-based) with
  invokeStream returning AsyncThrowingStream<UInt8, any Error> via _HTTPClient
- fetchStream now async throws and returns (stream, HTTPURLResponse) tuple,
  allowing pre-stream validation (errors thrown before stream is returned)
- Remove StreamResponseDelegate class
- Set session timeout via configuration instead of per-request
- Fix relay error header name typo (x-relay -> x-relay-error)
- Update FunctionsClientTests and SupabaseClient for actor isolation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(functions): catch HTTPClientError and convert to FunctionsError in rawInvoke

_HTTPClient.fetchData now throws HTTPClientError.responseError on non-2xx
responses. FunctionsClient.rawInvoke catches it and converts to the
public FunctionsError.httpError type.

Co-Authored-B... (continued)
Pull Request #917: feat!: v3

305 of 378 new or added lines in 29 files covered. (80.69%)

28 existing lines in 4 files now uncovered.

7198 of 8902 relevant lines covered (80.86%)

31.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.73
/Sources/Helpers/_HTTPClient.swift


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc