supabase / supabase-swift

A Swift client for Supabase
https://supabase.com/docs/reference/swift
MIT License
727 stars 111 forks source link

Replace to HTTPTypes.HTTPRequest from Helpers.HTTPRequest #568

Open zunda-pixel opened 1 month ago

zunda-pixel commented 1 month ago

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 and PostgrestResponse.response
    • HTTPURLResponse -> HTTPResponse
  3. remove StorageHTTPSession.upload

Copyright

URLSession for HTTPRequest(URLSession+AsyncAwait.swift) code from apple/swift-http-types We need this code until update to Swift 6

grdsdev commented 1 month ago

Thanks for taking the leap on this @zunda-pixel.

We're not in the stage on having breaking changes at the moment, I'm planning a v3 for next couple of months, breaking changes will have to wait until then. For now, we need to make sure changes are retro-compatible.

zunda-pixel commented 1 month ago

Ok, I am looking forward to v3. Supabase v3 is based release/v3 branch?

grdsdev commented 1 month ago

Yes @zunda-pixel , that is the branch.

There are basically 3 issues that I want to fix yet on v2 before I move focus to v3, they are these ones: https://github.com/supabase/supabase-swift/issues?q=is%3Aopen+is%3Aissue+milestone%3Av2

zunda-pixel commented 1 week ago

@grdsdev Should I create pull-request to v3 branch?