Skip to content

Conversation

zunda-pixel
Copy link
Owner

@zunda-pixel zunda-pixel commented Oct 15, 2024

Description

Replace to HTTPTypes's Components.

  1. Helpers.HTTPRequest -> (request: HTTPRequest, bodyData: Data?)
  2. Helpers.HTTPResponse -> (Data, HTTPTypes.HTTPResponse)

Breaking Changes

  1. FunctionsClient.FetchHandler and PostgrestClient.FetchHandler
    • old: (_ request: HTTPRequest) async throws -> HTTPResponse
    • new: (_ request: HTTPRequest, _ bodyData: Data?) async throws -> (Data, HTTPResponse)
  2. HTTPError.response
    • HTTPURLResponse -> HTTPResponse
  3. PostgrestResponse.response
    • HTTPURLResponse -> HTTPResponse
  4. remove StorageHTTPSession.upload

Copyright

URLSession for HTTPRequest(URLSession+AsyncAwait.swift) code from apple/swift-http-types
We can remove this code, if update to Swift 6

@zunda-pixel zunda-pixel changed the title Replace http request Replace HTTPTypes.HTTPRequest from Helpers.HTTPRequest Oct 15, 2024
@zunda-pixel zunda-pixel force-pushed the replace-HTTPRequest branch 2 times, most recently from ae3daa3 to 6a52265 Compare October 15, 2024 16:50
@zunda-pixel zunda-pixel changed the title Replace HTTPTypes.HTTPRequest from Helpers.HTTPRequest Replace to HTTPTypes.HTTPRequest from Helpers.HTTPRequest Oct 15, 2024
# Conflicts:
#	Sources/Realtime/V2/Types.swift
#	Sources/Supabase/SupabaseClient.swift
#	Tests/IntegrationTests/Postgrest/PostgrestFilterTests.swift
# Conflicts:
#	Sources/Auth/AuthClient.swift
#	Tests/AuthTests/RequestsTests.swift
#	Tests/AuthTests/__Snapshots__/RequestsTests/testSignUpWithPhoneAndPassword.1.txt
# Conflicts:
#	Package.swift
#	Sources/Realtime/V2/RealtimeChannelV2.swift
#	Tests/IntegrationTests/RealtimeIntegrationTests.swift
#	Tests/RealtimeTests/MockWebSocketClient.swift
#	Tests/RealtimeTests/RealtimeTests.swift
#	Tests/RealtimeTests/_PushTests.swift
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