@@ -204,7 +204,7 @@ public actor GoTrueClient {
204204 return try await _signUp (
205205 request: . init(
206206 path: " /signup " ,
207- method: " POST " ,
207+ method: . post ,
208208 query: [
209209 redirectTo. map { URLQueryItem ( name: " redirect_to " , value: $0. absoluteString) } ,
210210 ] . compactMap { $0 } ,
@@ -237,7 +237,7 @@ public actor GoTrueClient {
237237 try await _signUp (
238238 request: . init(
239239 path: " /signup " ,
240- method: " POST " ,
240+ method: . post ,
241241 body: configuration. encoder. encode (
242242 SignUpRequest (
243243 password: password,
@@ -271,7 +271,7 @@ public actor GoTrueClient {
271271 try await _signIn (
272272 request: . init(
273273 path: " /token " ,
274- method: " POST " ,
274+ method: . post ,
275275 query: [ URLQueryItem ( name: " grant_type " , value: " password " ) ] ,
276276 body: configuration. encoder. encode (
277277 UserCredentials ( email: email, password: password)
@@ -286,7 +286,7 @@ public actor GoTrueClient {
286286 try await _signIn (
287287 request: . init(
288288 path: " /token " ,
289- method: " POST " ,
289+ method: . post ,
290290 query: [ URLQueryItem ( name: " grant_type " , value: " password " ) ] ,
291291 body: configuration. encoder. encode (
292292 UserCredentials ( password: password, phone: phone)
@@ -302,7 +302,7 @@ public actor GoTrueClient {
302302 try await _signIn (
303303 request: . init(
304304 path: " /token " ,
305- method: " POST " ,
305+ method: . post ,
306306 query: [ URLQueryItem ( name: " grant_type " , value: " id_token " ) ] ,
307307 body: configuration. encoder. encode ( credentials)
308308 )
@@ -350,7 +350,7 @@ public actor GoTrueClient {
350350 try await api. execute (
351351 . init(
352352 path: " /otp " ,
353- method: " POST " ,
353+ method: . post ,
354354 query: [
355355 redirectTo. map { URLQueryItem ( name: " redirect_to " , value: $0. absoluteString) } ,
356356 ] . compactMap { $0 } ,
@@ -385,7 +385,7 @@ public actor GoTrueClient {
385385 try await api. execute (
386386 . init(
387387 path: " /otp " ,
388- method: " POST " ,
388+ method: . post ,
389389 body: configuration. encoder. encode (
390390 OTPParams (
391391 phone: phone,
@@ -407,7 +407,7 @@ public actor GoTrueClient {
407407 let session : Session = try await api. execute (
408408 . init(
409409 path: " /token " ,
410- method: " POST " ,
410+ method: . post ,
411411 query: [ URLQueryItem ( name: " grant_type " , value: " pkce " ) ] ,
412412 body: configuration. encoder. encode (
413413 [
@@ -519,7 +519,7 @@ public actor GoTrueClient {
519519 let user = try await api. execute (
520520 . init(
521521 path: " /user " ,
522- method: " GET " ,
522+ method: . get ,
523523 headers: [ " Authorization " : " \( tokenType) \( accessToken) " ]
524524 )
525525 ) . decoded ( as: User . self, decoder: configuration. decoder)
@@ -593,7 +593,7 @@ public actor GoTrueClient {
593593 try await api. authorizedExecute (
594594 . init(
595595 path: " /logout " ,
596- method: " POST "
596+ method: . post
597597 )
598598 )
599599 await sessionManager. remove ( )
@@ -616,7 +616,7 @@ public actor GoTrueClient {
616616 try await _verifyOTP (
617617 request: . init(
618618 path: " /verify " ,
619- method: " POST " ,
619+ method: . post ,
620620 query: [
621621 redirectTo. map { URLQueryItem ( name: " redirect_to " , value: $0. absoluteString) } ,
622622 ] . compactMap { $0 } ,
@@ -644,7 +644,7 @@ public actor GoTrueClient {
644644 try await _verifyOTP (
645645 request: . init(
646646 path: " /verify " ,
647- method: " POST " ,
647+ method: . post ,
648648 body: configuration. encoder. encode (
649649 VerifyOTPParams (
650650 phone: phone,
@@ -686,7 +686,7 @@ public actor GoTrueClient {
686686 /// Should be used only when you require the most current user data. For faster results,
687687 /// session.user is recommended.
688688 public func user( jwt: String ? = nil ) async throws -> User {
689- var request = Request ( path: " /user " , method: " GET " )
689+ var request = Request ( path: " /user " , method: . get )
690690
691691 if let jwt {
692692 request. headers [ " Authorization " ] = " Bearer \( jwt) "
@@ -709,7 +709,7 @@ public actor GoTrueClient {
709709
710710 var session = try await sessionManager. session ( )
711711 let updatedUser = try await api. authorizedExecute (
712- . init( path: " /user " , method: " PUT " , body: configuration. encoder. encode ( user) )
712+ . init( path: " /user " , method: . put , body: configuration. encoder. encode ( user) )
713713 ) . decoded ( as: User . self, decoder: configuration. decoder)
714714 session. user = updatedUser
715715 try await sessionManager. update ( session)
@@ -728,7 +728,7 @@ public actor GoTrueClient {
728728 try await api. execute (
729729 . init(
730730 path: " /recover " ,
731- method: " POST " ,
731+ method: . post ,
732732 query: [
733733 redirectTo. map { URLQueryItem ( name: " redirect_to " , value: $0. absoluteString) } ,
734734 ] . compactMap { $0 } ,
@@ -759,7 +759,7 @@ public actor GoTrueClient {
759759 let session = try await api. execute (
760760 . init(
761761 path: " /token " ,
762- method: " POST " ,
762+ method: . post ,
763763 query: [ URLQueryItem ( name: " grant_type " , value: " refresh_token " ) ] ,
764764 body: configuration. encoder. encode ( credentials)
765765 )
0 commit comments