File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public class PostgrestBuilder: @unchecked Sendable {
76
76
options: FetchOptions ,
77
77
decode: ( Data ) throws -> T
78
78
) async throws -> PostgrestResponse < T > {
79
- mutableState. withValue {
79
+ let request = mutableState. withValue {
80
80
$0. fetchOptions = options
81
81
82
82
if $0. fetchOptions. head {
@@ -103,9 +103,11 @@ public class PostgrestBuilder: @unchecked Sendable {
103
103
$0. request. headers [ " Content-Profile " ] = schema
104
104
}
105
105
}
106
+
107
+ return $0. request
106
108
}
107
109
108
- let response = try await http. fetch ( mutableState . value . request, baseURL: configuration. url)
110
+ let response = try await http. fetch ( request, baseURL: configuration. url)
109
111
110
112
guard 200 ..< 300 ~= response. statusCode else {
111
113
let error = try configuration. decoder. decode ( PostgrestError . self, from: response. data)
You can’t perform that action at this time.
0 commit comments